Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
e668cb07
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e668cb07
编写于
11月 27, 2020
作者:
Z
Zhou Wei
提交者:
GitHub
11月 27, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix CUDA 11 error on windows (#29101)
上级
085260f3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
21 addition
and
8 deletion
+21
-8
CMakeLists.txt
CMakeLists.txt
+0
-1
cmake/external/boost.cmake
cmake/external/boost.cmake
+4
-0
cmake/external/glog.cmake
cmake/external/glog.cmake
+1
-0
cmake/generic.cmake
cmake/generic.cmake
+6
-6
paddle/fluid/platform/dynload/dynamic_loader.cc
paddle/fluid/platform/dynload/dynamic_loader.cc
+10
-1
未找到文件。
CMakeLists.txt
浏览文件 @
e668cb07
...
...
@@ -55,7 +55,6 @@ if(WIN32)
set
(
CMAKE_SUPPRESS_REGENERATION ON
)
set
(
CMAKE_STATIC_LIBRARY_PREFIX lib
)
add_definitions
(
"/DGOOGLE_GLOG_DLL_DECL="
)
if
(
MSVC_STATIC_CRT
)
message
(
STATUS
"Use static C runtime time, refer to https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=vs-2019"
)
...
...
cmake/external/boost.cmake
浏览文件 @
e668cb07
...
...
@@ -38,6 +38,10 @@ set(BOOST_INCLUDE_DIR "${BOOST_SOURCE_DIR}" CACHE PATH "boost include directory.
set_directory_properties
(
PROPERTIES CLEAN_NO_CUSTOM 1
)
include_directories
(
${
BOOST_INCLUDE_DIR
}
)
if
(
WIN32 AND MSVC_VERSION GREATER_EQUAL 1600
)
add_definitions
(
-DBOOST_HAS_STATIC_ASSERT
)
endif
()
ExternalProject_Add
(
${
BOOST_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
...
...
cmake/external/glog.cmake
浏览文件 @
e668cb07
...
...
@@ -24,6 +24,7 @@ SET(GLOG_TAG v0.3.5)
IF
(
WIN32
)
SET
(
GLOG_LIBRARIES
"
${
GLOG_INSTALL_DIR
}
/lib/glog.lib"
CACHE FILEPATH
"glog library."
FORCE
)
SET
(
GLOG_CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4267 /wd4530"
)
add_definitions
(
"/DGOOGLE_GLOG_DLL_DECL="
)
ELSE
(
WIN32
)
SET
(
GLOG_LIBRARIES
"
${
GLOG_INSTALL_DIR
}
/lib/libglog.a"
CACHE FILEPATH
"glog library."
FORCE
)
SET
(
GLOG_CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
...
...
cmake/generic.cmake
浏览文件 @
e668cb07
...
...
@@ -448,9 +448,9 @@ function(nv_library TARGET_NAME)
message
(
FATAL
"Please specify source file or library in nv_library."
)
endif
()
endif
(
nv_library_SRCS
)
if
(
WIN32
)
if
(
WIN32
AND
${
CMAKE_CUDA_COMPILER_VERSION
}
LESS 11.0
)
set_target_properties
(
${
TARGET_NAME
}
PROPERTIES VS_USER_PROPS
${
WIN_PROPS
}
)
endif
(
WIN32
)
endif
()
endif
()
endfunction
(
nv_library
)
...
...
@@ -466,9 +466,9 @@ function(nv_binary TARGET_NAME)
add_dependencies
(
${
TARGET_NAME
}
${
nv_binary_DEPS
}
)
common_link
(
${
TARGET_NAME
}
)
endif
()
if
(
WIN32
)
if
(
WIN32
AND
${
CMAKE_CUDA_COMPILER_VERSION
}
LESS 11.0
)
set_target_properties
(
${
TARGET_NAME
}
PROPERTIES VS_USER_PROPS
${
WIN_PROPS
}
)
endif
(
WIN32
)
endif
()
endif
()
endfunction
(
nv_binary
)
...
...
@@ -490,9 +490,9 @@ function(nv_test TARGET_NAME)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true
)
if
(
WIN32
)
if
(
WIN32
AND
${
CMAKE_CUDA_COMPILER_VERSION
}
LESS 11.0
)
set_target_properties
(
${
TARGET_NAME
}
PROPERTIES VS_USER_PROPS
${
WIN_PROPS
}
)
endif
(
WIN32
)
endif
()
endif
()
endfunction
(
nv_test
)
...
...
paddle/fluid/platform/dynload/dynamic_loader.cc
浏览文件 @
e668cb07
...
...
@@ -67,16 +67,25 @@ static constexpr char cuda_lib_path[] = "/usr/local/cuda/lib64";
static
PathNode
s_py_site_pkg_path
;
#if defined(_WIN32) && defined(PADDLE_WITH_CUDA)
static
constexpr
char
*
win_cudnn_lib
=
"cudnn64_"
CUDNN_MAJOR_VERSION
".dll"
;
static
constexpr
char
*
win_cublas_lib
=
"cublas64_"
CUDA_VERSION_MAJOR
CUDA_VERSION_MINOR
".dll;cublas64_"
CUDA_VERSION_MAJOR
".dll"
;
#if CUDA_VERSION >= 11000
static
constexpr
char
*
win_curand_lib
=
"curand64_"
CUDA_VERSION_MAJOR
CUDA_VERSION_MINOR
".dll;curand64_"
CUDA_VERSION_MAJOR
".dll;curand64_10.dll"
;
static
constexpr
char
*
win_cusolver_lib
=
"cusolver64_"
CUDA_VERSION_MAJOR
CUDA_VERSION_MINOR
".dll;cusolver64_"
CUDA_VERSION_MAJOR
".dll;cusolver64_10.dll"
;
#else
static
constexpr
char
*
win_curand_lib
=
"curand64_"
CUDA_VERSION_MAJOR
CUDA_VERSION_MINOR
".dll;curand64_"
CUDA_VERSION_MAJOR
".dll"
;
static
constexpr
char
*
win_cudnn_lib
=
"cudnn64_"
CUDNN_MAJOR_VERSION
".dll"
;
static
constexpr
char
*
win_cusolver_lib
=
"cusolver64_"
CUDA_VERSION_MAJOR
CUDA_VERSION_MINOR
".dll;cusolver64_"
CUDA_VERSION_MAJOR
".dll"
;
#endif // CUDA_VERSION
#endif
static
inline
std
::
string
join
(
const
std
::
string
&
part1
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录