Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
172d4ecb
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
172d4ecb
编写于
7月 09, 2020
作者:
C
Chen Weihang
提交者:
GitHub
7月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove WITH_DSO compile option (#25444)
上级
bb45af02
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
6 addition
and
153 deletion
+6
-153
CMakeLists.txt
CMakeLists.txt
+0
-1
cmake/configure.cmake
cmake/configure.cmake
+0
-4
cmake/cuda.cmake
cmake/cuda.cmake
+0
-6
cmake/hip.cmake
cmake/hip.cmake
+0
-4
cmake/tensorrt.cmake
cmake/tensorrt.cmake
+2
-8
paddle/fluid/platform/CMakeLists.txt
paddle/fluid/platform/CMakeLists.txt
+2
-2
paddle/fluid/platform/dynload/cublas.h
paddle/fluid/platform/dynload/cublas.h
+0
-11
paddle/fluid/platform/dynload/cuda_driver.cc
paddle/fluid/platform/dynload/cuda_driver.cc
+0
-4
paddle/fluid/platform/dynload/cuda_driver.h
paddle/fluid/platform/dynload/cuda_driver.h
+0
-15
paddle/fluid/platform/dynload/cudnn.cc
paddle/fluid/platform/dynload/cudnn.cc
+0
-4
paddle/fluid/platform/dynload/cudnn.h
paddle/fluid/platform/dynload/cudnn.h
+0
-15
paddle/fluid/platform/dynload/cupti.h
paddle/fluid/platform/dynload/cupti.h
+0
-11
paddle/fluid/platform/dynload/curand.h
paddle/fluid/platform/dynload/curand.h
+1
-11
paddle/fluid/platform/dynload/cusolver.h
paddle/fluid/platform/dynload/cusolver.h
+1
-11
paddle/fluid/platform/dynload/nccl.h
paddle/fluid/platform/dynload/nccl.h
+0
-12
paddle/fluid/platform/dynload/nvrtc.cc
paddle/fluid/platform/dynload/nvrtc.cc
+0
-4
paddle/fluid/platform/dynload/nvrtc.h
paddle/fluid/platform/dynload/nvrtc.h
+0
-15
paddle/fluid/platform/dynload/tensorrt.h
paddle/fluid/platform/dynload/tensorrt.h
+0
-13
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+0
-2
未找到文件。
CMakeLists.txt
浏览文件 @
172d4ecb
...
@@ -79,7 +79,6 @@ find_package(Threads REQUIRED)
...
@@ -79,7 +79,6 @@ find_package(Threads REQUIRED)
include
(
simd
)
include
(
simd
)
################################ Exposed Configurations #######################################
################################ Exposed Configurations #######################################
option
(
WITH_DSO
"Compile PaddlePaddle with dynamic linked CUDA"
ON
)
option
(
WITH_AVX
"Compile PaddlePaddle with AVX intrinsics"
${
AVX_FOUND
}
)
option
(
WITH_AVX
"Compile PaddlePaddle with AVX intrinsics"
${
AVX_FOUND
}
)
option
(
WITH_PYTHON
"Compile PaddlePaddle with python interpreter"
ON
)
option
(
WITH_PYTHON
"Compile PaddlePaddle with python interpreter"
ON
)
option
(
WITH_TESTING
"Compile PaddlePaddle with unit testing"
OFF
)
option
(
WITH_TESTING
"Compile PaddlePaddle with unit testing"
OFF
)
...
...
cmake/configure.cmake
浏览文件 @
172d4ecb
...
@@ -16,10 +16,6 @@ if(NOT WITH_PYTHON)
...
@@ -16,10 +16,6 @@ if(NOT WITH_PYTHON)
add_definitions
(
-DPADDLE_NO_PYTHON
)
add_definitions
(
-DPADDLE_NO_PYTHON
)
endif
(
NOT WITH_PYTHON
)
endif
(
NOT WITH_PYTHON
)
if
(
WITH_DSO
)
add_definitions
(
-DPADDLE_USE_DSO
)
endif
(
WITH_DSO
)
if
(
WITH_TESTING
)
if
(
WITH_TESTING
)
add_definitions
(
-DPADDLE_WITH_TESTING
)
add_definitions
(
-DPADDLE_WITH_TESTING
)
endif
(
WITH_TESTING
)
endif
(
WITH_TESTING
)
...
...
cmake/cuda.cmake
浏览文件 @
172d4ecb
...
@@ -188,12 +188,6 @@ endif()
...
@@ -188,12 +188,6 @@ endif()
add_definitions
(
"-DPADDLE_CUDA_BINVER=
\"
${
CUDA_VERSION_MAJOR
}${
CUDA_VERSION_MINOR
}
\"
"
)
add_definitions
(
"-DPADDLE_CUDA_BINVER=
\"
${
CUDA_VERSION_MAJOR
}${
CUDA_VERSION_MINOR
}
\"
"
)
if
(
NOT WITH_DSO
)
if
(
WIN32
)
set_property
(
GLOBAL PROPERTY CUDA_MODULES
${
CUDNN_LIBRARY
}
${
CUDA_CUBLAS_LIBRARIES
}
${
CUDA_curand_LIBRARY
}
${
CUDA_cusolver_LIBRARY
}
)
endif
(
WIN32
)
endif
(
NOT WITH_DSO
)
# setting nvcc arch flags
# setting nvcc arch flags
select_nvcc_arch_flags
(
NVCC_FLAGS_EXTRA
)
select_nvcc_arch_flags
(
NVCC_FLAGS_EXTRA
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
${
NVCC_FLAGS_EXTRA
}
"
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
${
NVCC_FLAGS_EXTRA
}
"
)
...
...
cmake/hip.cmake
浏览文件 @
172d4ecb
...
@@ -13,10 +13,6 @@ include_directories("/opt/rocm/thrust")
...
@@ -13,10 +13,6 @@ include_directories("/opt/rocm/thrust")
set
(
HIP_HCC_FLAGS
"
${
HIP_HCC_FLAGS
}
-fPIC -DPADDLE_WITH_HIP -std=c++11"
)
set
(
HIP_HCC_FLAGS
"
${
HIP_HCC_FLAGS
}
-fPIC -DPADDLE_WITH_HIP -std=c++11"
)
if
(
WITH_DSO
)
set
(
HIP_HCC_FLAGS
"
${
HIP_HCC_FLAGS
}
-DPADDLE_USE_DSO"
)
endif
(
WITH_DSO
)
if
(
WITH_TESTING
)
if
(
WITH_TESTING
)
set
(
HIP_HCC_FLAGS
"
${
HIP_HCC_FLAGS
}
-DPADDLE_WITH_TESTING"
)
set
(
HIP_HCC_FLAGS
"
${
HIP_HCC_FLAGS
}
-DPADDLE_WITH_TESTING"
)
endif
(
WITH_TESTING
)
endif
(
WITH_TESTING
)
...
...
cmake/tensorrt.cmake
浏览文件 @
172d4ecb
...
@@ -37,16 +37,10 @@ find_library(TENSORRT_LIBRARY NAMES ${TR_INFER_LIB} ${TR_INFER_RT}
...
@@ -37,16 +37,10 @@ find_library(TENSORRT_LIBRARY NAMES ${TR_INFER_LIB} ${TR_INFER_RT}
DOC
"Path to TensorRT library."
)
DOC
"Path to TensorRT library."
)
if
(
TENSORRT_INCLUDE_DIR AND TENSORRT_LIBRARY
)
if
(
TENSORRT_INCLUDE_DIR AND TENSORRT_LIBRARY
)
if
(
WITH_DSO
)
set
(
TENSORRT_FOUND ON
)
set
(
TENSORRT_FOUND ON
)
endif
(
WITH_DSO
)
else
()
else
()
set
(
TENSORRT_FOUND OFF
)
set
(
TENSORRT_FOUND OFF
)
if
(
WITH_DSO
)
message
(
STATUS
"TensorRT is disabled."
)
message
(
WARNING
"TensorRT is NOT found when WITH_DSO is ON."
)
else
(
WITH_DSO
)
message
(
STATUS
"TensorRT is disabled because WITH_DSO is OFF."
)
endif
(
WITH_DSO
)
endif
()
endif
()
if
(
TENSORRT_FOUND
)
if
(
TENSORRT_FOUND
)
...
...
paddle/fluid/platform/CMakeLists.txt
浏览文件 @
172d4ecb
...
@@ -94,10 +94,10 @@ if(WITH_GPU)
...
@@ -94,10 +94,10 @@ if(WITH_GPU)
endif
()
endif
()
if
(
WIN32
)
if
(
WIN32
)
if
(
WITH_GPU
AND NOT WITH_DSO
)
if
(
WITH_GPU
)
get_property
(
cuda_modules GLOBAL PROPERTY CUDA_MODULES
)
get_property
(
cuda_modules GLOBAL PROPERTY CUDA_MODULES
)
target_link_libraries
(
device_context
${
cuda_modules
}
)
target_link_libraries
(
device_context
${
cuda_modules
}
)
endif
(
WITH_GPU
AND NOT WITH_DSO
)
endif
(
WITH_GPU
)
endif
(
WIN32
)
endif
(
WIN32
)
nv_test
(
device_context_test SRCS device_context_test.cu DEPS device_context gpu_info
)
nv_test
(
device_context_test SRCS device_context_test.cu DEPS device_context gpu_info
)
...
...
paddle/fluid/platform/dynload/cublas.h
浏览文件 @
172d4ecb
...
@@ -36,7 +36,6 @@ extern void *cublas_dso_handle;
...
@@ -36,7 +36,6 @@ extern void *cublas_dso_handle;
*
*
* note: default dynamic linked libs
* note: default dynamic linked libs
*/
*/
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_CUBLAS_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CUBLAS_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
using FUNC_TYPE = decltype(&::__name); \
using FUNC_TYPE = decltype(&::__name); \
...
@@ -50,16 +49,6 @@ extern void *cublas_dso_handle;
...
@@ -50,16 +49,6 @@ extern void *cublas_dso_handle;
} \
} \
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CUBLAS_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
inline cublasStatus_t operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define CUBLAS_BLAS_ROUTINE_EACH(__macro) \
#define CUBLAS_BLAS_ROUTINE_EACH(__macro) \
__macro(cublasSaxpy_v2); \
__macro(cublasSaxpy_v2); \
...
...
paddle/fluid/platform/dynload/cuda_driver.cc
浏览文件 @
172d4ecb
...
@@ -25,14 +25,10 @@ void* cuda_dso_handle = nullptr;
...
@@ -25,14 +25,10 @@ void* cuda_dso_handle = nullptr;
CUDA_ROUTINE_EACH
(
DEFINE_WRAP
);
CUDA_ROUTINE_EACH
(
DEFINE_WRAP
);
#ifdef PADDLE_USE_DSO
bool
HasCUDADriver
()
{
bool
HasCUDADriver
()
{
std
::
call_once
(
cuda_dso_flag
,
[]()
{
cuda_dso_handle
=
GetCUDADsoHandle
();
});
std
::
call_once
(
cuda_dso_flag
,
[]()
{
cuda_dso_handle
=
GetCUDADsoHandle
();
});
return
cuda_dso_handle
!=
nullptr
;
return
cuda_dso_handle
!=
nullptr
;
}
}
#else
bool
HasCUDADriver
()
{
return
false
;
}
#endif
}
// namespace dynload
}
// namespace dynload
}
// namespace platform
}
// namespace platform
...
...
paddle/fluid/platform/dynload/cuda_driver.h
浏览文件 @
172d4ecb
...
@@ -27,8 +27,6 @@ extern std::once_flag cuda_dso_flag;
...
@@ -27,8 +27,6 @@ extern std::once_flag cuda_dso_flag;
extern
void
*
cuda_dso_handle
;
extern
void
*
cuda_dso_handle
;
extern
bool
HasCUDADriver
();
extern
bool
HasCUDADriver
();
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_CUDA_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CUDA_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -43,19 +41,6 @@ extern bool HasCUDADriver();
...
@@ -43,19 +41,6 @@ extern bool HasCUDADriver();
}; \
}; \
extern struct DynLoad__##__name __name
extern struct DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CUDA_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
inline auto operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
/**
/**
* include all needed cuda driver functions
* include all needed cuda driver functions
**/
**/
...
...
paddle/fluid/platform/dynload/cudnn.cc
浏览文件 @
172d4ecb
...
@@ -50,7 +50,6 @@ CUDNN_DNN_ROUTINE_EACH_R7(DEFINE_WRAP);
...
@@ -50,7 +50,6 @@ CUDNN_DNN_ROUTINE_EACH_R7(DEFINE_WRAP);
CUDNN_DNN_ROUTINE_EACH_AFTER_R7
(
DEFINE_WRAP
);
CUDNN_DNN_ROUTINE_EACH_AFTER_R7
(
DEFINE_WRAP
);
#endif
#endif
#ifdef PADDLE_USE_DSO
bool
HasCUDNN
()
{
bool
HasCUDNN
()
{
std
::
call_once
(
cudnn_dso_flag
,
std
::
call_once
(
cudnn_dso_flag
,
[]()
{
cudnn_dso_handle
=
GetCUDNNDsoHandle
();
});
[]()
{
cudnn_dso_handle
=
GetCUDNNDsoHandle
();
});
...
@@ -64,9 +63,6 @@ void EnforceCUDNNLoaded(const char* fn_name) {
...
@@ -64,9 +63,6 @@ void EnforceCUDNNLoaded(const char* fn_name) {
"Cannot load cudnn shared library. Cannot invoke method %s."
,
"Cannot load cudnn shared library. Cannot invoke method %s."
,
fn_name
));
fn_name
));
}
}
#else
bool
HasCUDNN
()
{
return
true
;
}
#endif
}
// namespace dynload
}
// namespace dynload
}
// namespace platform
}
// namespace platform
...
...
paddle/fluid/platform/dynload/cudnn.h
浏览文件 @
172d4ecb
...
@@ -28,8 +28,6 @@ extern std::once_flag cudnn_dso_flag;
...
@@ -28,8 +28,6 @@ extern std::once_flag cudnn_dso_flag;
extern
void
*
cudnn_dso_handle
;
extern
void
*
cudnn_dso_handle
;
extern
bool
HasCUDNN
();
extern
bool
HasCUDNN
();
#ifdef PADDLE_USE_DSO
extern
void
EnforceCUDNNLoaded
(
const
char
*
fn_name
);
extern
void
EnforceCUDNNLoaded
(
const
char
*
fn_name
);
#define DECLARE_DYNAMIC_LOAD_CUDNN_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CUDNN_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
...
@@ -46,19 +44,6 @@ extern void EnforceCUDNNLoaded(const char* fn_name);
...
@@ -46,19 +44,6 @@ extern void EnforceCUDNNLoaded(const char* fn_name);
}; \
}; \
extern struct DynLoad__##__name __name
extern struct DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CUDNN_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
inline auto operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
/**
/**
* include all needed cudnn functions in HPPL
* include all needed cudnn functions in HPPL
* different cudnn version has different interfaces
* different cudnn version has different interfaces
...
...
paddle/fluid/platform/dynload/cupti.h
浏览文件 @
172d4ecb
...
@@ -36,7 +36,6 @@ extern void *cupti_dso_handle;
...
@@ -36,7 +36,6 @@ extern void *cupti_dso_handle;
*
*
* note: default dynamic linked libs
* note: default dynamic linked libs
*/
*/
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_CUPTI_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CUPTI_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -50,16 +49,6 @@ extern void *cupti_dso_handle;
...
@@ -50,16 +49,6 @@ extern void *cupti_dso_handle;
} \
} \
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CUPTI_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
inline CUptiResult CUPTIAPI operator()(Args... args) { \
return __name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define CUPTI_ROUTINE_EACH(__macro) \
#define CUPTI_ROUTINE_EACH(__macro) \
__macro(cuptiActivityEnable); \
__macro(cuptiActivityEnable); \
...
...
paddle/fluid/platform/dynload/curand.h
浏览文件 @
172d4ecb
...
@@ -25,7 +25,7 @@ namespace platform {
...
@@ -25,7 +25,7 @@ namespace platform {
namespace
dynload
{
namespace
dynload
{
extern
std
::
once_flag
curand_dso_flag
;
extern
std
::
once_flag
curand_dso_flag
;
extern
void
*
curand_dso_handle
;
extern
void
*
curand_dso_handle
;
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_CURAND_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CURAND_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -39,16 +39,6 @@ extern void *curand_dso_handle;
...
@@ -39,16 +39,6 @@ extern void *curand_dso_handle;
} \
} \
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CURAND_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
curandStatus_t operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define CURAND_RAND_ROUTINE_EACH(__macro) \
#define CURAND_RAND_ROUTINE_EACH(__macro) \
__macro(curandCreateGenerator); \
__macro(curandCreateGenerator); \
...
...
paddle/fluid/platform/dynload/cusolver.h
浏览文件 @
172d4ecb
...
@@ -26,7 +26,7 @@ namespace platform {
...
@@ -26,7 +26,7 @@ namespace platform {
namespace
dynload
{
namespace
dynload
{
extern
std
::
once_flag
cusolver_dso_flag
;
extern
std
::
once_flag
cusolver_dso_flag
;
extern
void
*
cusolver_dso_handle
;
extern
void
*
cusolver_dso_handle
;
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_CUSOLVER_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_CUSOLVER_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -41,16 +41,6 @@ extern void *cusolver_dso_handle;
...
@@ -41,16 +41,6 @@ extern void *cusolver_dso_handle;
} \
} \
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_CUSOLVER_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
cusolverStatus_t operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define CUSOLVER_ROUTINE_EACH(__macro) \
#define CUSOLVER_ROUTINE_EACH(__macro) \
__macro(cusolverDnCreate); \
__macro(cusolverDnCreate); \
...
...
paddle/fluid/platform/dynload/nccl.h
浏览文件 @
172d4ecb
...
@@ -26,8 +26,6 @@ namespace dynload {
...
@@ -26,8 +26,6 @@ namespace dynload {
extern
std
::
once_flag
nccl_dso_flag
;
extern
std
::
once_flag
nccl_dso_flag
;
extern
void
*
nccl_dso_handle
;
extern
void
*
nccl_dso_handle
;
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_NCCL_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_NCCL_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -41,16 +39,6 @@ extern void* nccl_dso_handle;
...
@@ -41,16 +39,6 @@ extern void* nccl_dso_handle;
} \
} \
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_NCCL_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
ncclResult_t operator()(Args... args) { \
return __name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define NCCL_RAND_ROUTINE_EACH(__macro) \
#define NCCL_RAND_ROUTINE_EACH(__macro) \
__macro(ncclCommInitAll); \
__macro(ncclCommInitAll); \
...
...
paddle/fluid/platform/dynload/nvrtc.cc
浏览文件 @
172d4ecb
...
@@ -25,15 +25,11 @@ void* nvrtc_dso_handle = nullptr;
...
@@ -25,15 +25,11 @@ void* nvrtc_dso_handle = nullptr;
NVRTC_ROUTINE_EACH
(
DEFINE_WRAP
);
NVRTC_ROUTINE_EACH
(
DEFINE_WRAP
);
#ifdef PADDLE_USE_DSO
bool
HasNVRTC
()
{
bool
HasNVRTC
()
{
std
::
call_once
(
nvrtc_dso_flag
,
std
::
call_once
(
nvrtc_dso_flag
,
[]()
{
nvrtc_dso_handle
=
GetNVRTCDsoHandle
();
});
[]()
{
nvrtc_dso_handle
=
GetNVRTCDsoHandle
();
});
return
nvrtc_dso_handle
!=
nullptr
;
return
nvrtc_dso_handle
!=
nullptr
;
}
}
#else
bool
HasNVRTC
()
{
return
false
;
}
#endif
}
// namespace dynload
}
// namespace dynload
}
// namespace platform
}
// namespace platform
...
...
paddle/fluid/platform/dynload/nvrtc.h
浏览文件 @
172d4ecb
...
@@ -27,8 +27,6 @@ extern std::once_flag nvrtc_dso_flag;
...
@@ -27,8 +27,6 @@ extern std::once_flag nvrtc_dso_flag;
extern
void
*
nvrtc_dso_handle
;
extern
void
*
nvrtc_dso_handle
;
extern
bool
HasNVRTC
();
extern
bool
HasNVRTC
();
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_NVRTC_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_NVRTC_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -43,19 +41,6 @@ extern bool HasNVRTC();
...
@@ -43,19 +41,6 @@ extern bool HasNVRTC();
}; \
}; \
extern struct DynLoad__##__name __name
extern struct DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_NVRTC_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
inline auto operator()(Args... args) { \
return ::__name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
/**
/**
* include all needed nvrtc functions
* include all needed nvrtc functions
**/
**/
...
...
paddle/fluid/platform/dynload/tensorrt.h
浏览文件 @
172d4ecb
...
@@ -30,8 +30,6 @@ namespace dynload {
...
@@ -30,8 +30,6 @@ namespace dynload {
extern
std
::
once_flag
tensorrt_dso_flag
;
extern
std
::
once_flag
tensorrt_dso_flag
;
extern
void
*
tensorrt_dso_handle
;
extern
void
*
tensorrt_dso_handle
;
#ifdef PADDLE_USE_DSO
#define DECLARE_DYNAMIC_LOAD_TENSORRT_WRAP(__name) \
#define DECLARE_DYNAMIC_LOAD_TENSORRT_WRAP(__name) \
struct DynLoad__##__name { \
struct DynLoad__##__name { \
template <typename... Args> \
template <typename... Args> \
...
@@ -49,17 +47,6 @@ extern void* tensorrt_dso_handle;
...
@@ -49,17 +47,6 @@ extern void* tensorrt_dso_handle;
}; \
}; \
extern DynLoad__##__name __name
extern DynLoad__##__name __name
#else
#define DECLARE_DYNAMIC_LOAD_TENSORRT_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
tensorrtResult_t operator()(Args... args) { \
return __name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
#define TENSORRT_RAND_ROUTINE_EACH(__macro) \
#define TENSORRT_RAND_ROUTINE_EACH(__macro) \
__macro(createInferBuilder_INTERNAL); \
__macro(createInferBuilder_INTERNAL); \
__macro(createInferRuntime_INTERNAL);
__macro(createInferRuntime_INTERNAL);
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
172d4ecb
...
@@ -193,7 +193,6 @@ function cmake_base() {
...
@@ -193,7 +193,6 @@ function cmake_base() {
Configuring cmake in /paddle/build ...
Configuring cmake in /paddle/build ...
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
:-
Release
}
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
:-
Release
}
${
PYTHON_FLAGS
}
${
PYTHON_FLAGS
}
-DWITH_DSO=ON
-DWITH_GPU=
${
WITH_GPU
:-
OFF
}
-DWITH_GPU=
${
WITH_GPU
:-
OFF
}
-DWITH_AMD_GPU=
${
WITH_AMD_GPU
:-
OFF
}
-DWITH_AMD_GPU=
${
WITH_AMD_GPU
:-
OFF
}
-DWITH_DISTRIBUTE=
${
distibuted_flag
}
-DWITH_DISTRIBUTE=
${
distibuted_flag
}
...
@@ -222,7 +221,6 @@ EOF
...
@@ -222,7 +221,6 @@ EOF
cmake ..
\
cmake ..
\
-DCMAKE_BUILD_TYPE
=
${
CMAKE_BUILD_TYPE
:-
Release
}
\
-DCMAKE_BUILD_TYPE
=
${
CMAKE_BUILD_TYPE
:-
Release
}
\
${
PYTHON_FLAGS
}
\
${
PYTHON_FLAGS
}
\
-DWITH_DSO
=
ON
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
-DWITH_AMD_GPU
=
${
WITH_AMD_GPU
:-
OFF
}
\
-DWITH_AMD_GPU
=
${
WITH_AMD_GPU
:-
OFF
}
\
-DWITH_DISTRIBUTE
=
${
distibuted_flag
}
\
-DWITH_DISTRIBUTE
=
${
distibuted_flag
}
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录