Skip to content

Add support for Kokkos v5; drop support for Kokkos v3#418

Open
mpokorny wants to merge 2 commits intoStanfordLegion:mainfrom
mpokorny:kokkos5
Open

Add support for Kokkos v5; drop support for Kokkos v3#418
mpokorny wants to merge 2 commits intoStanfordLegion:mainfrom
mpokorny:kokkos5

Conversation

@mpokorny
Copy link
Copy Markdown
Contributor

Kokkos_Array.hpp is included in inst_layout.h to get the correct template parameters in the Kokkos::Array declaration. 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.


#ifdef REALM_USE_KOKKOS_INITIALIZATION_SETTINGS
Kokkos::InitializationSettings init_settings;
init_settings.set_device_id(gpu->gpu->info->index);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not have to specify the device id in kokkos v5?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants