Add support for Kokkos v5; drop support for Kokkos v3#418
Open
mpokorny wants to merge 2 commits intoStanfordLegion:mainfrom
Open
Add support for Kokkos v5; drop support for Kokkos v3#418mpokorny wants to merge 2 commits intoStanfordLegion:mainfrom
mpokorny wants to merge 2 commits intoStanfordLegion:mainfrom
Conversation
eddy16112
reviewed
Apr 9, 2026
|
|
||
| #ifdef REALM_USE_KOKKOS_INITIALIZATION_SETTINGS | ||
| Kokkos::InitializationSettings init_settings; | ||
| init_settings.set_device_id(gpu->gpu->info->index); |
Contributor
There was a problem hiding this comment.
We do not have to specify the device id in kokkos v5?
Contributor
Author
There was a problem hiding this comment.
With the current support for Kokkos in Realm and Legion (whatever the Kokkos version), it's not possible to configure the machine with more than one GPU, and Kokkos can just be told that the device id is zero.
With another PR that I've got lined up, the restriction of one GPU can be removed. But then the device_id value in the call to Kokkos::Cuda::impl_initialize() doesn't really matter much, and the default value is fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kokkos_Array.hppis included ininst_layout.hto get the correct template parameters in theKokkos::Arraydeclaration. It's not quite as simple as declaring the two-parameter version because the correct choice depends on whether or not v4 deprecated code is enabled in Kokkos.I tested the build with both Kokkos v4.7 and v5.0, but there are not unit tests in Realm to verify the result. I did, however, build Legion with this branch against both Kokkos versions, and verified the results using
kokkos_saxpy.