docs: Update the CudaPackage (build system) description#20742
docs: Update the CudaPackage (build system) description#20742tldahlgren merged 3 commits intospack:developfrom
Conversation
ax3l
left a comment
There was a problem hiding this comment.
Thank you for improving the docs of this! ✨
|
@Rombur would be a good person to review too |
| cuda_arch = cuda_arch_list[0] | ||
| 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.
Should we be using cuda_flags here? The base class has a static method for this.
There was a problem hiding this comment.
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.
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.
The dihydrogen package only uses -arch=sm_60 (for its CMAKE_CUDA_FLAGS macro) when there is a single architecture with the value auto.
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
CudaPackagedescription by:cuda_flagsmethod; andUsagesection.