提交 5f51d0af 编写于 作者: Y Yi Wang

Add -D PADDLE_WITH_CUDA in cmake/configure.cmake

上级 77e07833
...@@ -49,11 +49,16 @@ if(NOT WITH_GOLANG) ...@@ -49,11 +49,16 @@ if(NOT WITH_GOLANG)
endif(NOT WITH_GOLANG) endif(NOT WITH_GOLANG)
if(NOT WITH_GPU) if(NOT WITH_GPU)
# Will gradually remove uses of PADDLE_ONLY_CPU in source files,
# so could we remove -DPADDLE_ONLY_CPU.
# c.f. https://github.com/PaddlePaddle/Paddle/issues/4588
add_definitions(-DPADDLE_ONLY_CPU) add_definitions(-DPADDLE_ONLY_CPU)
add_definitions(-DHPPL_STUB_FUNC) add_definitions(-DHPPL_STUB_FUNC)
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu) list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
else() else()
add_definitions(-DPADDLE_WITH_CUDA)
FIND_PACKAGE(CUDA REQUIRED) FIND_PACKAGE(CUDA REQUIRED)
if(${CUDA_VERSION_MAJOR} VERSION_LESS 7) if(${CUDA_VERSION_MAJOR} VERSION_LESS 7)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册