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

RelWithDebInfo & CUDA -G #1060

Closed
ax3l opened this issue Jul 2, 2020 · 2 comments · Fixed by #1977
Closed

RelWithDebInfo & CUDA -G #1060

ax3l opened this issue Jul 2, 2020 · 2 comments · Fixed by #1977
Assignees
Labels
Backend:CUDA Backend:HIP Type:Bug Type:CMake Related to build system Type:Install installation & packaging

Comments

@ax3l
Copy link
Member

ax3l commented Jul 2, 2020

The CMake option RelWithDebInfo is runtime performance neutral and enables all optimizations. On Linux, debug symbols are stored in a separate part of the binary and with MSVC in separate files.

Therefore, we should not add -G debug with RelWithDebInfo as this turns all device optimizations off:
https://github.com/alpaka-group/alpaka/blob/0.5.0/cmake/alpakaCommon.cmake#L514

Without checking, this is probably similar with HIP:
https://github.com/alpaka-group/alpaka/blob/0.5.0/cmake/alpakaCommon.cmake#L642

References:

@j-stephan
Copy link
Member

Which flags does CMake's first class CUDA support use? Maybe we should just mirror those.

@ax3l
Copy link
Member Author

ax3l commented Jul 10, 2020

As far as I can see it, CMake does not add -G in debug mode for CUDA device code. But it seems to generally not manipulate the device flags depending on the build type much (yet), which could just be originated in the relatively recent addition of it.

@j-stephan j-stephan added the Type:CMake Related to build system label Feb 10, 2023
@j-stephan j-stephan self-assigned this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend:CUDA Backend:HIP Type:Bug Type:CMake Related to build system Type:Install installation & packaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants