“46df7c44a5b220a96a852dd120c7a83f0c52c199”上不存在“deep_speech_2/model_utils/tests/test_decoders.py”
提交 ea6ff5a2 编写于 作者: Z zlsh80826

fix tensorrt plugin typo, test=develop

上级 d2fc396f
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
#pragma once #pragma once
#include <NvInfer.h> #include <NvInfer.h>
#ifdef USE_NVINFER_PLUGIN
#include <NvInferPlugin.h>
#endif
#if !defined(_WIN32) #if !defined(_WIN32)
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
...@@ -56,22 +59,22 @@ extern void* tensorrt_plugin_dso_handle; ...@@ -56,22 +59,22 @@ extern void* tensorrt_plugin_dso_handle;
}; \ }; \
extern DynLoad__##__name __name extern DynLoad__##__name __name
#define DECLARE_DYNAMIC_LOAD_TENSORRT_PLUGIN_WRAP(__name) \ #define DECLARE_DYNAMIC_LOAD_TENSORRT_PLUGIN_WRAP(__name) \
struct DynLoad__##__name { \ struct DynLoad__##__name { \
template <typename... Args> \ template <typename... Args> \
auto operator()(Args... args) -> DECLARE_TYPE(__name, args...) { \ auto operator()(Args... args) -> DECLARE_TYPE(__name, args...) { \
std::call_once(tensorrt_plugin_dso_flag, []() { \ std::call_once(tensorrt_plugin_dso_flag, []() { \
tensorrt_dso_plugin_handle = \ tensorrt_plugin_dso_handle = \
paddle::platform::dynload::GetTensorRtPluginHandle(); \ paddle::platform::dynload::GetTensorRtPluginHandle(); \
}); \ }); \
static void* p_##__name = dlsym(tensorrt_plugin_dso_handle, #__name); \ static void* p_##__name = dlsym(tensorrt_plugin_dso_handle, #__name); \
if (p_##__name == nullptr) { \ PADDLE_ENFORCE_NOT_NULL(p_##__name, \
return nullptr; \ platform::errors::Unavailable( \
} \ "Load tensorrt plugin %s failed", #__name)); \
using tensorrt_plugin_func = decltype(&::__name); \ using tensorrt_plugin_func = decltype(&::__name); \
return reinterpret_cast<tensorrt_plugin_func>(p_##__name)(args...); \ return reinterpret_cast<tensorrt_plugin_func>(p_##__name)(args...); \
} \ } \
}; \ }; \
extern DynLoad__##__name __name extern DynLoad__##__name __name
#if (NV_TENSORRT_MAJOR >= 6) #if (NV_TENSORRT_MAJOR >= 6)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册