Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
a73a4a8f
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a73a4a8f
编写于
6月 16, 2020
作者:
T
T8T9
提交者:
GitHub
6月 16, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
don't support cmake 3.12, 3.13, 3.14 (#25021)
上级
028de857
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
8 addition
and
1 deletion
+8
-1
CMakeLists.txt
CMakeLists.txt
+7
-0
cmake/cuda.cmake
cmake/cuda.cmake
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
a73a4a8f
...
@@ -27,6 +27,13 @@ include(init)
...
@@ -27,6 +27,13 @@ include(init)
# TODO(Shibo Tao): remove find_package(CUDA) completely.
# TODO(Shibo Tao): remove find_package(CUDA) completely.
find_package
(
CUDA QUIET
)
find_package
(
CUDA QUIET
)
option
(
WITH_GPU
"Compile PaddlePaddle with NVIDIA GPU"
${
CUDA_FOUND
}
)
option
(
WITH_GPU
"Compile PaddlePaddle with NVIDIA GPU"
${
CUDA_FOUND
}
)
# cmake 3.12, 3.13, 3.14 will append gcc link options to nvcc, and nvcc doesn't recognize them.
if
(
WITH_GPU
AND
(
${
CMAKE_VERSION
}
VERSION_GREATER_EQUAL 3.12
)
AND
(
${
CMAKE_VERSION
}
VERSION_LESS 3.15
))
message
(
FATAL_ERROR
"cmake
${
CMAKE_VERSION
}
is not supported when WITH_GPU=ON because of bug https://tinyurl.com/ydbb9m7n. "
"You can use cmake 3.16 (recommended), 3.10, 3.11, 3.15 or 3.17. Please refer to the install document: https://cmake.org/install/"
)
endif
()
if
(
WITH_GPU AND NOT APPLE
)
if
(
WITH_GPU AND NOT APPLE
)
enable_language
(
CUDA
)
enable_language
(
CUDA
)
message
(
STATUS
"CUDA compiler:
${
CMAKE_CUDA_COMPILER
}
, version: "
message
(
STATUS
"CUDA compiler:
${
CMAKE_CUDA_COMPILER
}
, version: "
...
...
cmake/cuda.cmake
浏览文件 @
a73a4a8f
...
@@ -205,7 +205,7 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
...
@@ -205,7 +205,7 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
# So, don't set these flags here.
# So, don't set these flags here.
if
(
NOT WIN32
)
# windows msvc2015 support c++11 natively.
if
(
NOT WIN32
)
# windows msvc2015 support c++11 natively.
# -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
# -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
set
(
CMAKE_CUDA_
FLAGS
"
${
CMAKE_CUDA_FLAGS
}
-std=c++11"
)
set
(
CMAKE_CUDA_
STANDARD 11
)
endif
(
NOT WIN32
)
endif
(
NOT WIN32
)
# in cuda9, suppress cuda warning on eigen
# in cuda9, suppress cuda warning on eigen
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录