Skip to content

sirius: inherit from ROCmPackage#31207

Merged
alalazo merged 3 commits intospack:developfrom
albestro:alby/sirius_use_rocmpackage
Aug 8, 2022
Merged

sirius: inherit from ROCmPackage#31207
alalazo merged 3 commits intospack:developfrom
albestro:alby/sirius_use_rocmpackage

Conversation

@albestro
Copy link
Copy Markdown
Contributor

I admit I didn't test this...so I would kindly ask maintainers who may have a ready build environment for sirius if they can check it works correctly...sorry for that.

It is not expected to change (much) the overall behavior: ROCmPackage privides hip dependency, together with the variants rocm and amdgpu_target (with a centralised set of existing architectures).

For what concerns amdgpu_target variant:

  • there would be no default anymore,
  • the values supported should still support multiple values, but also none see any_combination_of

These changes may requires some additional fix either in the package itself (is none supported by the CMake logic?) and/or in the user workflow (no defaults, may require the user to specify actual architecture).

Looking forward for your reviews.

@albestro albestro requested review from AdhocMan and dev-zero and removed request for AdhocMan and dev-zero June 21, 2022 07:40
@toxa81
Copy link
Copy Markdown
Contributor

toxa81 commented Jun 21, 2022

We can merge it as-is and then test on our build farm. @AdhocMan do you need to introduce similar changes to SpFFT and SPLA?

@albestro
Copy link
Copy Markdown
Contributor Author

We can merge it as-is and then test on our build farm. @AdhocMan do you need to introduce similar changes to SpFFT and SPLA?

I just gave a look: spfft probably yes, spla may benefit from it (currently has rocm variant but it does not take into account amdgpu_target).

Copy link
Copy Markdown
Contributor

@simonpintarelli simonpintarelli left a comment

Choose a reason for hiding this comment

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

Thank you @albestro. It compiled successfully for me.

Copy link
Copy Markdown
Contributor

@AdhocMan AdhocMan left a comment

Choose a reason for hiding this comment

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

If None is a possible value of amdgpu_target, then this is currently not properly handled, because the values will be used to define HIP_HCC_FLAGS and I think --amdgpu-target=None is not a valid flag. So I'd suggest to just not define this CMake argument it in this case, which will let SIRIUS make the choice.

@AdhocMan
Copy link
Copy Markdown
Contributor

We can merge it as-is and then test on our build farm. @AdhocMan do you need to introduce similar changes to SpFFT and SPLA?

I just gave a look: spfft probably yes, spla may benefit from it (currently has rocm variant but it does not take into account amdgpu_target).

SPLA does not have any GPU kernels, so it should not require these changes. But yes, SpFFT should be similar to SIRIUS and could benefit from it.

@albestro
Copy link
Copy Markdown
Contributor Author

albestro commented Jun 22, 2022

If None is a possible value of amdgpu_target, then this is currently not properly handled, because the values will be used to define HIP_HCC_FLAGS and I think --amdgpu-target=None is not a valid flag. So I'd suggest to just not define this CMake argument it in this case, which will let SIRIUS make the choice.

@AdhocMan, I've just checked and it is already managed in ROCmPackage 😉

# need amd gpu type for rocm builds
conflicts('amdgpu_target=none', when='+rocm')

AdhocMan
AdhocMan previously approved these changes Jun 22, 2022
Copy link
Copy Markdown
Contributor

@AdhocMan AdhocMan left a comment

Choose a reason for hiding this comment

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

@AdhocMan, I've just checked and it is already managed in ROCmPackage 😉

# need amd gpu type for rocm builds
conflicts('amdgpu_target=none', when='+rocm')

Great, this looks good to me then.

@simonpintarelli
Copy link
Copy Markdown
Contributor

Can we merge this?

dev-zero
dev-zero previously approved these changes Aug 7, 2022
alalazo
alalazo previously approved these changes Aug 8, 2022
@alalazo
Copy link
Copy Markdown
Member

alalazo commented Aug 8, 2022

There's a conflict to be solved before merging

@albestro albestro dismissed stale reviews from alalazo, dev-zero, and AdhocMan via 526f2b8 August 8, 2022 07:45
@albestro
Copy link
Copy Markdown
Contributor Author

albestro commented Aug 8, 2022

sorry, I didn't see the conflict after the merge. I just solved the conflicts, can @simonpintarelli have a look if everything is correct?

thanks!

@simonpintarelli
Copy link
Copy Markdown
Contributor

Thank you @albestro, this looks good to me!

@alalazo alalazo merged commit 32a31d0 into spack:develop Aug 8, 2022
@albestro albestro deleted the alby/sirius_use_rocmpackage branch August 8, 2022 11:45
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.

7 participants