Skip to content

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.

@Aurelius84 Aurelius84 requested a review from chenwhql September 3, 2021 11:43
# 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