提交 130cdda6 编写于 作者: P peizhilin

add gpu debug mode

上级 a37918c3
...@@ -167,8 +167,12 @@ select_nvcc_arch_flags(NVCC_FLAGS_EXTRA) ...@@ -167,8 +167,12 @@ select_nvcc_arch_flags(NVCC_FLAGS_EXTRA)
list(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA}) list(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})
message(STATUS "Added CUDA NVCC flags for: ${NVCC_FLAGS_EXTRA_readable}") message(STATUS "Added CUDA NVCC flags for: ${NVCC_FLAGS_EXTRA_readable}")
# Set C++11 support if (WIN32)
set(CUDA_PROPAGATE_HOST_FLAGS OFF) set(CUDA_PROPAGATE_HOST_FLAGS ON)
else (WIN32)
# Set C++11 support
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
endif (WIN32)
# Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc. # Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
# So, don't set these flags here. # So, don't set these flags here.
......
...@@ -2,7 +2,12 @@ if(NOT WITH_GPU) ...@@ -2,7 +2,12 @@ if(NOT WITH_GPU)
return() return()
endif() endif()
set(CUDNN_ROOT "/usr" CACHE PATH "CUDNN ROOT") if(WIN32)
set(CUDNN_ROOT ${CUDA_TOOLKIT_ROOT_DIR})
else(WIN32)
set(CUDNN_ROOT "/usr" CACHE PATH "CUDNN ROOT")
endif(WIN32)
find_path(CUDNN_INCLUDE_DIR cudnn.h find_path(CUDNN_INCLUDE_DIR cudnn.h
PATHS ${CUDNN_ROOT} ${CUDNN_ROOT}/include PATHS ${CUDNN_ROOT} ${CUDNN_ROOT}/include
$ENV{CUDNN_ROOT} $ENV{CUDNN_ROOT}/include ${CUDA_TOOLKIT_INCLUDE} $ENV{CUDNN_ROOT} $ENV{CUDNN_ROOT}/include ${CUDA_TOOLKIT_INCLUDE}
......
...@@ -16,8 +16,9 @@ if(WITH_AMD_GPU) ...@@ -16,8 +16,9 @@ if(WITH_AMD_GPU)
ExternalProject_Add( ExternalProject_Add(
extern_eigen3 extern_eigen3
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
GIT_REPOSITORY "https://github.com/sabreshao/hipeigen.git" # GIT_REPOSITORY "https://github.com/sabreshao/hipeigen.git"
GIT_TAG 0cba03ff9f8f9f70bbd92ac5857b031aa8fed6f9 # GIT_TAG 0cba03ff9f8f9f70bbd92ac5857b031aa8fed6f9
GIT_REPOSITORY "http://admin@172.20.90.14:8080/r/eigen3.git"
PREFIX ${EIGEN_SOURCE_DIR} PREFIX ${EIGEN_SOURCE_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
...@@ -30,7 +31,7 @@ else() ...@@ -30,7 +31,7 @@ else()
extern_eigen3 extern_eigen3
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror" # GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror"
GIT_REPOSITORY "http://admin@localhost:8080/r/eigen3.git" GIT_REPOSITORY "http://admin@172.20.90.14:8080/r/eigen3.git"
# eigen on cuda9.1 missing header of math_funtions.hpp # eigen on cuda9.1 missing header of math_funtions.hpp
# https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen # https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen
# GIT_TAG 917060c364181f33a735dc023818d5a54f60e54c # GIT_TAG 917060c364181f33a735dc023818d5a54f60e54c
......
...@@ -29,7 +29,7 @@ ExternalProject_Add( ...@@ -29,7 +29,7 @@ ExternalProject_Add(
extern_gflags extern_gflags
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY "https://github.com/gflags/gflags.git" # GIT_REPOSITORY "https://github.com/gflags/gflags.git"
GIT_REPOSITORY "http://admin@localhost:8080/r/gflags.git" GIT_REPOSITORY "http://admin@172.20.90.14:8080/r/gflags.git"
# GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a # GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a
PREFIX ${GFLAGS_SOURCES_DIR} PREFIX ${GFLAGS_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
......
...@@ -34,7 +34,7 @@ ELSE() ...@@ -34,7 +34,7 @@ ELSE()
SET(GLOG_REPOSITORY "https://github.com/google/glog.git") SET(GLOG_REPOSITORY "https://github.com/google/glog.git")
SET(GLOG_TAG "v0.3.5") SET(GLOG_TAG "v0.3.5")
ENDIF() ENDIF()
SET(GLOG_REPOSITORY "http://admin@localhost:8080/r/glog.git") SET(GLOG_REPOSITORY "http://admin@172.20.90.14:8080/r/glog.git")
ExternalProject_Add( ExternalProject_Add(
extern_glog extern_glog
......
...@@ -44,7 +44,7 @@ IF(WITH_TESTING) ...@@ -44,7 +44,7 @@ IF(WITH_TESTING)
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
DEPENDS ${GTEST_DEPENDS} DEPENDS ${GTEST_DEPENDS}
# GIT_REPOSITORY "https://github.com/google/googletest.git" # GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_REPOSITORY "http://admin@localhost:8080/r/gtest.git" GIT_REPOSITORY "http://admin@172.20.90.14:8080/r/gtest.git"
# GIT_TAG "release-1.8.0" # GIT_TAG "release-1.8.0"
PREFIX ${GTEST_SOURCES_DIR} PREFIX ${GTEST_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
......
...@@ -77,7 +77,7 @@ IF(NOT ${CBLAS_FOUND}) ...@@ -77,7 +77,7 @@ IF(NOT ${CBLAS_FOUND})
extern_openblas extern_openblas
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git # GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
GIT_REPOSITORY http://admin@localhost:8080/r/openblas.git GIT_REPOSITORY http://admin@172.20.90.14:8080/r/openblas.git
# GIT_TAG ${OPENBLAS_COMMIT} # GIT_TAG ${OPENBLAS_COMMIT}
PREFIX ${CBLAS_SOURCES_DIR} PREFIX ${CBLAS_SOURCES_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR}
...@@ -105,7 +105,7 @@ IF(NOT ${CBLAS_FOUND}) ...@@ -105,7 +105,7 @@ IF(NOT ${CBLAS_FOUND})
extern_openblas extern_openblas
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git # GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
GIT_REPOSITORY http://admin@localhost:8080/r/openblas.git GIT_REPOSITORY http://admin@172.20.90.14:8080/r/openblas.git
# GIT_TAG ${OPENBLAS_COMMIT} # GIT_TAG ${OPENBLAS_COMMIT}
PREFIX ${CBLAS_SOURCES_DIR} PREFIX ${CBLAS_SOURCES_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR}
......
...@@ -208,7 +208,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -208,7 +208,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
# SET(PROTOBUF_REPO "https://github.com/google/protobuf.git") # SET(PROTOBUF_REPO "https://github.com/google/protobuf.git")
# SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546") # SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546")
SET(PROTOBUF_REPO http://admin@localhost:8080/r/protobuf.git) SET(PROTOBUF_REPO http://admin@172.20.90.14:8080/r/protobuf.git)
IF(MOBILE_INFERENCE) IF(MOBILE_INFERENCE)
# The reason why the official version is not used is described in # The reason why the official version is not used is described in
# https://github.com/PaddlePaddle/Paddle/issues/6114 # https://github.com/PaddlePaddle/Paddle/issues/6114
......
...@@ -32,7 +32,7 @@ ExternalProject_Add( ...@@ -32,7 +32,7 @@ ExternalProject_Add(
extern_zlib extern_zlib
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY "https://github.com/madler/zlib.git" # GIT_REPOSITORY "https://github.com/madler/zlib.git"
GIT_REPOSITORY "http://admin@localhost:8080/r/zlib.git" GIT_REPOSITORY "http://admin@172.20.90.14:8080/r/zlib.git"
# GIT_TAG "v1.2.8" # GIT_TAG "v1.2.8"
PREFIX ${ZLIB_SOURCES_DIR} PREFIX ${ZLIB_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册