Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support build with gcc12 for CUDA less than 12.0 #50106

Merged
merged 15 commits into from
Feb 7, 2023

Conversation

chalsliu
Copy link
Contributor

@chalsliu chalsliu commented Jan 31, 2023

PR types

Others

PR changes

Others

Describe

Support build with gcc12 for CUDA less than 12.0
已经支持cuda 12以下版本使用 gcc12 + gcc10编译器混合编译:
1)使用gcc12编译 cpp 代码
2)使用gcc10编译 cuda 代码
3)使用gcc12链接器

@paddle-bot
Copy link

paddle-bot bot commented Jan 31, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jan 31, 2023
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Feb 1, 2023
@PaddlePaddle PaddlePaddle unlocked this conversation Feb 1, 2023
device_tracer
tensor)
if(NOT DEFINED CMAKE_CUDA_COMPILER_VERSION)
cc_binary(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 if/else 内容没有区别?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,这里可以合并,已经提commit

if(WITH_GPU)
if(${CMAKE_CUDA_COMPILER_VERSION} LESS 12.0 AND ${CMAKE_CXX_COMPILER_VERSION}
VERSION_GREATER 12.0)
return()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一块直接return对下面逻辑有没有啥影响?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的 不编译print_phi_kernels这个工具 不影响训练 也不影响推理
之所以不编译是为了避免 gcc12+gcc10混合编译情况下,这里的找不到符号的问题

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的 不编译print_phi_kernels这个工具 不影响训练 也不影响推理 之所以不编译是为了避免 gcc12+gcc10混合编译情况下,这里的找不到符号的问题

更正一下,这里的gcc12+gcc10应该指的是gcc12+nvcc10吧?

Copy link
Contributor Author

@chalsliu chalsliu Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是的,是gcc10,nvcc搭配的ccbin compiler

@yuanlehome
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Support build with gcc12 for CUDA less than 12.0

PR描述里感觉可以填写下目前支持的程度,有没有什么TODO之类的

Copy link
Contributor

@yuanlehome yuanlehome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chalsliu chalsliu merged commit 755049f into PaddlePaddle:develop Feb 7, 2023
@paddle-bot
Copy link

paddle-bot bot commented Feb 7, 2023

你的PR已合入Paddle库,请关注后续测试结果。
Your PR has been merged into the repository. An official integration test will be conducted later. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants