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

Add DPADDLE_WITH_CUDA for GCC #35448

Merged
merged 2 commits into from
Sep 7, 2021
Merged

Conversation

Aurelius84
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Add DPADDLE_WITH_CUDA for GCC

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 3, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -433,6 +433,9 @@ def unix_custom_single_compiler(obj, src, ext, cc_args, extra_postargs,
# See https://stackoverflow.com/questions/34571583/understanding-gcc-5s-glibcxx-use-cxx11-abi-or-the-new-abi
add_compile_flag(['-D_GLIBCXX_USE_CXX11_ABI=1'], cflags)

if not is_cuda_file(src):
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. windows需要加判断吗
  2. 如果用户仅编译cc文件,也会添加这个宏吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

windows也添加了。这里只会对Extension中联合编译了 .cu 文件时,才会对编译.cc文件额外添加PADDLE_WITH_CUDA

Copy link
Contributor

@chenwhql chenwhql 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

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@Aurelius84 Aurelius84 merged commit cec36ea into PaddlePaddle:develop Sep 7, 2021
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this pull request Sep 29, 2021
* Add DPADDLE_WITH_CUDA for GCC

* polish code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants