Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
11f478fe
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
11f478fe
编写于
2月 06, 2023
作者:
zhouweiwei2014
提交者:
GitHub
2月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cherry-pick 2.4]fix compil error on windows for cuda11.6/7/8 (#50205)
上级
edd0541b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
5 deletion
+10
-5
CMakeLists.txt
CMakeLists.txt
+7
-1
cmake/external/cub.cmake
cmake/external/cub.cmake
+2
-2
cmake/third_party.cmake
cmake/third_party.cmake
+1
-2
未找到文件。
CMakeLists.txt
浏览文件 @
11f478fe
...
...
@@ -155,8 +155,14 @@ if(WIN32)
endforeach
()
endif
()
#
NOTE(zhouwei):
msvc max/min macro conflict with std::min/max, define NOMINMAX globally
# msvc max/min macro conflict with std::min/max, define NOMINMAX globally
add_definitions
(
"-DNOMINMAX"
)
# 1. windows.h define 'small' cause CUDA11.6/11.7/11.8 's cub compile error,
# see https://github.com/microsoft/onnxruntime/issues/11227
# 2. WIN32_LEAN_AND_MEAN minimize the windows include files, avoid define 'small'
add_definitions
(
-DWIN32_LEAN_AND_MEAN
)
# windows build turn off warnings, use parallel compiling.
foreach
(
flag_var
...
...
cmake/external/cub.cmake
浏览文件 @
11f478fe
...
...
@@ -14,7 +14,7 @@
include
(
ExternalProject
)
#
Note(zhouwei):
extern_cub has code __FILE_, If the path of extern_cub is changed,
# extern_cub has code __FILE_, If the path of extern_cub is changed,
# it will effect about 30+ cu files sccache hit and slow compile speed on windows.
# Therefore, a fixed CUB_PATH will be input to increase the sccache hit rate.
set
(
CUB_PATH
...
...
@@ -25,7 +25,7 @@ set(CUB_PREFIX_DIR ${CUB_PATH})
set
(
CUB_REPOSITORY
${
GIT_URL
}
/NVlabs/cub.git
)
if
(
${
CMAKE_CUDA_COMPILER_VERSION
}
GREATER_EQUAL 11.6
)
# cuda_11.6
.2_511.65
‘s own cub is 1.15.0, which will cause compiling error in windows.
# cuda_11.6
/11.7/11.8
‘s own cub is 1.15.0, which will cause compiling error in windows.
set
(
CUB_TAG 1.16.0
)
# cub 1.16.0 is not compitable with current thrust version
add_definitions
(
-DTHRUST_IGNORE_CUB_VERSION_CHECK
)
...
...
cmake/third_party.cmake
浏览文件 @
11f478fe
...
...
@@ -317,8 +317,7 @@ if(WITH_ONNXRUNTIME)
endif
()
if
(
WITH_GPU
)
if
(
${
CMAKE_CUDA_COMPILER_VERSION
}
LESS 11.0 OR
${
CMAKE_CUDA_COMPILER_VERSION
}
GREATER_EQUAL 11.6
)
if
(
${
CMAKE_CUDA_COMPILER_VERSION
}
LESS 11.0
)
include
(
external/cub
)
# download cub
list
(
APPEND third_party_deps extern_cub
)
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录