Skip to content

hip: add cuda variant#33872

Merged
haampie merged 5 commits intospack:developfrom
cgmb:add-hip-cuda
Jan 24, 2023
Merged

hip: add cuda variant#33872
haampie merged 5 commits intospack:developfrom
cgmb:add-hip-cuda

Conversation

@cgmb
Copy link
Copy Markdown
Contributor

@cgmb cgmb commented Nov 13, 2022

This change lays the groundwork for supporting both +rocm and +cuda variants of hipblas, hipsolver, hipfft, hipsparse and hipcub.

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Dec 12, 2022

@srekolam, @haampie, @renjithravindrankannath: I will need to rebase this on ROCm 5.3 but do you have any thoughts on my suggestions in this PR? I imagine that adding +rocm and +cuda to the hip package might be a big deal, so perhaps that should be an independent PR.

It would be nice for hip{BLAS,SOLVER,SPARSE,FFT,RAND} to inherit from ROCmPackage like the various higher-level libraries do. If nothing else, it will give them the amdgpu_target variant. Changing them to inherit from CudaPackage and supporting the +cuda variant might have to wait until that hypothetical hip +cuda PR goes in, so maybe that means splitting this change into three PRs: CUDA support for the hip package, inheriting from ROCmPackage in the hip mathlibs, and inheriting from CudaPackage in the hip mathlibs.

@cgmb cgmb marked this pull request as ready for review December 16, 2022 09:49
@srekolam
Copy link
Copy Markdown
Contributor

@cgmb , the initial ask was to add the cuda support for the hip package issue (#26898) . i do agree with your other suggestion for mathlibs of inheriting from the ROCmPackage. Perhaps we can do this in multiple PRs but if we can get to support the +cuda inside the hip package , it would help .

@cgmb cgmb changed the title hip: add +cuda variants hip: add cuda variant Dec 17, 2022
@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Dec 17, 2022

Ok. I've turned this PR into the change to the hip package and split the updates to the mathlibs off into #34586. This change introduces the +rocm and +cuda variants into the HIP package.

I mostly left the current logic unchanged for +rocm, but had to guard it behind an if/else. The diff for this PR is a lot easier to review if you check the 'Hide whitespace' button.

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Dec 23, 2022

@spackbot rerun pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Dec 23, 2022

I've started that pipeline for you!

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 1, 2023

@spackbot rerun pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 1, 2023

I'm sorry, gitlab does not have your latest revision yet, I can't run that pipeline for you right now.

One likely possibility is that your PR pipeline has been temporarily deferred, in which case, it is awaiting a develop pipeline, and will be run when that finishes.

Please check the gitlab commit status message to see if more information is available.

Details
Unexpected response from gitlab: {'message': '404 Commit Not Found'}

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 3, 2023

@srekolam, @haampie, @renjithravindrankannath, this change is ready for review.

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 10, 2023

@srekolam, @haampie, @renjithravindrankannath:

Please review these changes. If the diff is a bit overwhelming, try using the "Hide whitespace" option (the checkbox for which is behind the gear on the Files changed tab). The changes required to add CUDA support are actually quite small.

Copy link
Copy Markdown
Contributor

@renjithravindrankannath renjithravindrankannath left a comment

Choose a reason for hiding this comment

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

LGTM

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 17, 2023

@spackbot rerun pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 17, 2023

I've started that pipeline for you!

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 17, 2023

@srekolam, @haampie, @renjithravindrankannath: I've fixed the merge conflicts, please take a look..

Copy link
Copy Markdown
Contributor

@srekolam srekolam left a comment

Choose a reason for hiding this comment

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

i have reviewed it from my side. Looks okay.

@renjithravindrankannath
Copy link
Copy Markdown
Contributor

Looks good to me.

@cgmb
Copy link
Copy Markdown
Contributor Author

cgmb commented Jan 18, 2023

@haampie: all checks have passed and the maintainers have approved. Could you review and/or merge?

@haampie haampie merged commit d17aaf8 into spack:develop Jan 24, 2023
@srekolam
Copy link
Copy Markdown
Contributor

@cgmb Thank you very much.

@cgmb cgmb deleted the add-hip-cuda branch January 25, 2023 03:41
kwryankrattiger pushed a commit to kwryankrattiger/spack that referenced this pull request Jan 27, 2023
amd-toolchain-support pushed a commit to amd-toolchain-support/spack that referenced this pull request Feb 16, 2023
techxdave pushed a commit to Tech-XCorp/spack that referenced this pull request Feb 17, 2023
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants