From 4d6aca4b33de65615eb48b7c86070917b637ff22 Mon Sep 17 00:00:00 2001 From: liaogang Date: Mon, 9 Jan 2017 10:50:21 +0800 Subject: [PATCH] Warpctc only support dynamic load --- cmake/external/openblas.cmake | 1 + cmake/util.cmake | 4 ---- paddle/cuda/src/hl_warpctc_wrap.cc | 10 ---------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 677999cc9f5..66a72cd243e 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -15,6 +15,7 @@ INCLUDE(cblas) IF(NOT ${CBLAS_FOUND}) + MESSAGE(FATAL_ERROR "Please install OpenBlas, MKL or ATLAS.") INCLUDE(ExternalProject) SET(CBLAS_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/openblas) diff --git a/cmake/util.cmake b/cmake/util.cmake index a6cb74853ef..7da52bb758a 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -121,10 +121,6 @@ function(link_paddle_exe TARGET_NAME) endif() endif() - if(NOT WITH_DSO) - target_link_libraries(${TARGET_NAME} ${WARPCTC_LIBRARIES}) - endif() - add_dependencies(${TARGET_NAME} ${external_project_dependencies}) endfunction() diff --git a/paddle/cuda/src/hl_warpctc_wrap.cc b/paddle/cuda/src/hl_warpctc_wrap.cc index 9ae8bc0f220..55b940ca67a 100644 --- a/paddle/cuda/src/hl_warpctc_wrap.cc +++ b/paddle/cuda/src/hl_warpctc_wrap.cc @@ -29,7 +29,6 @@ void* warpctc_dso_handle = nullptr; * false, you need to add the path of libwarp-ctc.so to * the linked-libs of paddle or to LD_PRELOAD. */ -#ifdef PADDLE_USE_DSO #define DYNAMIC_LOAD_WARPCTC_WRAP(__name) \ struct DynLoad__##__name { \ template \ @@ -41,15 +40,6 @@ void* warpctc_dso_handle = nullptr; return reinterpret_cast(p_##_name)(args...); \ } \ } __name; // struct DynLoad__##__name -#else -#define DYNAMIC_LOAD_WARPCTC_WRAP(__name) \ - struct DynLoad__##__name { \ - template \ - auto operator()(Args... args) -> decltype(__name(args...)) { \ - return __name(args...); \ - } \ - } __name; // struct DynLoad__##__name -#endif // include all needed warp-ctc functions DYNAMIC_LOAD_WARPCTC_WRAP(get_warpctc_version) -- GitLab