File tree Expand file tree Collapse file tree 6 files changed +8
-13
lines changed Expand file tree Collapse file tree 6 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ find_package(Threads REQUIRED)
2727include (system )
2828include (simd)
2929
30- ###################### Configurations ############################
30+ ################################ Configurations ########### ############################
3131option (WITH_GPU "Compile PaddlePaddle with NVIDIA GPU" ${CUDA_FOUND} )
3232option (WITH_AVX "Compile PaddlePaddle with AVX intrinsics" ${AVX_FOUND} )
33- option (WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" ON )
33+ option (WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" OFF )
3434option (WITH_TESTING "Compile PaddlePaddle with unit testing" ON )
3535option (WITH_SWIG_PY "Compile PaddlePaddle with inference api" ON )
3636option (WITH_STYLE_CHECK "Compile PaddlePaddle with style check" ON )
@@ -43,6 +43,7 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
4343option (ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF )
4444option (COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF )
4545option (ON_TRAVIS "Exclude special unit test on Travis CI" OFF )
46+ ########################################################################################
4647
4748include (external/zlib) # download, build, install zlib
4849include (external/gflags) # download, build, install gflags
Original file line number Diff line number Diff line change 1515INCLUDE (cblas)
1616
1717IF (NOT ${CBLAS_FOUND} )
18+ MESSAGE (FATAL_ERROR "Please install OpenBlas, MKL or ATLAS." )
1819 INCLUDE (ExternalProject)
1920
2021 SET (CBLAS_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR} /third_party/openblas)
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ ExternalProject_Add(
5353 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${WARPCTC_INSTALL_DIR}
5454 CMAKE_ARGS -DWITH_GPU=${WITH_GPU}
5555 CMAKE_ARGS -DWITH_OMP=${USE_OMP}
56+ CMAKE_ARGS -DWITH_TORCH=OFF
57+ CMAKE_ARGS -DBUILD_SHARED=ON
5658)
5759
5860LIST (APPEND external_project_dependencies warpctc)
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ function(link_paddle_exe TARGET_NAME)
120120 target_link_libraries (${TARGET_NAME} rt)
121121 endif ()
122122 endif ()
123+
123124 add_dependencies (${TARGET_NAME} ${external_project_dependencies} )
124125endfunction ()
125126
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ void* warpctc_dso_handle = nullptr;
2929 * false, you need to add the path of libwarp-ctc.so to
3030 * the linked-libs of paddle or to LD_PRELOAD.
3131 */
32- #ifdef PADDLE_USE_DSO
3332#define DYNAMIC_LOAD_WARPCTC_WRAP (__name ) \
3433 struct DynLoad__ ##__name { \
3534 template <typename ... Args> \
@@ -41,15 +40,6 @@ void* warpctc_dso_handle = nullptr;
4140 return reinterpret_cast <warpctcFunc>(p_##_name)(args...); \
4241 } \
4342 } __name; // struct DynLoad__##__name
44- #else
45- #define DYNAMIC_LOAD_WARPCTC_WRAP (__name ) \
46- struct DynLoad__ ##__name { \
47- template <typename ... Args> \
48- auto operator ()(Args... args) -> decltype(__name(args...)) { \
49- return __name (args...); \
50- } \
51- } __name; // struct DynLoad__##__name
52- #endif
5343
5444// include all needed warp-ctc functions
5545DYNAMIC_LOAD_WARPCTC_WRAP (get_warpctc_version)
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
1313 sudo make install
1414elif [[ " $TRAVIS_OS_NAME " == " osx" ]]; then
1515 export PYTHONPATH=/usr/local/lib/python2.7/site-packages
16- cmake .. -DON_TRAVIS=ON -DON_COVERALLS=ON -DCOVERALLS_UPLOAD=ON -DWITH_SWIG_PY=ON
16+ cmake .. -DON_TRAVIS=ON -DON_COVERALLS=ON -DCOVERALLS_UPLOAD=ON
1717 NPROC=` sysctl -n hw.ncpu`
1818 make -j $NPROC
1919fi
You can’t perform that action at this time.
0 commit comments