-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
docs: Update the CudaPackage (build system) description #20742
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving the docs of this! ✨
@Rombur would be a good person to review too |
if cuda_arch != 'none': | ||
options.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0])) | ||
args.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using cuda_flags
here? The base class has a static method for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base class' cuda_flags
returns a list of '--generate-code arch=compute_{0},code=sm_{0} --generate-code arch=compute_{0},code=compute_{0}'.format(s)
for s
in the list of arch's passed it. Is that equivalent when the flags are specified this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the dealii
package has a comment that it has compiler errors when using the values returned from cuda_flags
(see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dealii/package.py).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dihydrogen
package only uses -arch=sm_60
(for its CMAKE_CUDA_FLAGS
macro) when there is a single architecture with the value auto
.
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
f5e4d58
to
5cd7807
Compare
@Rombur @adamjstewart Are these changes sufficient under the circumstances? |
Docs look good to me. I know very little about CUDA, I just use it for PyTorch. One thing I might suggest adding is an example where you determine the As for the |
As I mentioned in the new ROCmPackage doc, I'm hesitant to add something like this to here since there is a risk it could cause issues in some environments. In that case, I referred to comments in the package (with a link to the package). Unfortunately, the CudaPackage doesn't have comments with that advice.
I'm not sure I follow the issue here. What do you mean by the |
|
Ah! Guess my head is buried too much in the core.
Thanks for the clarification. |
@adamjstewart Since Rombur approved this PR, is the content sufficient for now under the assumption it can be updated, as needed, should any of the changes you mentioned be performed? |
Thanks @adamjstewart |
This PR expands on the
CudaPackage
description by:cuda_flags
method; andUsage
section.