Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ find_package(Threads REQUIRED)
include(system)
include(simd)

###################### Configurations ############################
################################ Configurations #######################################
option(WITH_GPU "Compile PaddlePaddle with NVIDIA GPU" ${CUDA_FOUND})
option(WITH_AVX "Compile PaddlePaddle with AVX intrinsics" ${AVX_FOUND})
option(WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" ON)
option(WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" OFF)
option(WITH_TESTING "Compile PaddlePaddle with unit testing" ON)
option(WITH_SWIG_PY "Compile PaddlePaddle with inference api" ON)
option(WITH_STYLE_CHECK "Compile PaddlePaddle with style check" ON)
Expand All @@ -43,6 +43,7 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
option(ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF)
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
########################################################################################

include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags
Expand Down
1 change: 1 addition & 0 deletions cmake/external/openblas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions cmake/external/warpctc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ ExternalProject_Add(
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${WARPCTC_INSTALL_DIR}
CMAKE_ARGS -DWITH_GPU=${WITH_GPU}
CMAKE_ARGS -DWITH_OMP=${USE_OMP}
CMAKE_ARGS -DWITH_TORCH=OFF
CMAKE_ARGS -DBUILD_SHARED=ON
)

LIST(APPEND external_project_dependencies warpctc)
1 change: 1 addition & 0 deletions cmake/util.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function(link_paddle_exe TARGET_NAME)
target_link_libraries(${TARGET_NAME} rt)
endif()
endif()

add_dependencies(${TARGET_NAME} ${external_project_dependencies})
endfunction()

Expand Down
10 changes: 0 additions & 10 deletions paddle/cuda/src/hl_warpctc_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename... Args> \
Expand All @@ -41,15 +40,6 @@ void* warpctc_dso_handle = nullptr;
return reinterpret_cast<warpctcFunc>(p_##_name)(args...); \
} \
} __name; // struct DynLoad__##__name
#else
#define DYNAMIC_LOAD_WARPCTC_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
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)
Expand Down
2 changes: 1 addition & 1 deletion paddle/scripts/travis/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo make install
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PYTHONPATH=/usr/local/lib/python2.7/site-packages
cmake .. -DON_TRAVIS=ON -DON_COVERALLS=ON -DCOVERALLS_UPLOAD=ON -DWITH_SWIG_PY=ON
cmake .. -DON_TRAVIS=ON -DON_COVERALLS=ON -DCOVERALLS_UPLOAD=ON
NPROC=`sysctl -n hw.ncpu`
make -j $NPROC
fi