Skip to content

Commit

Permalink
tpetra: compatibility update with KOKKOS_VERSION>=40499
Browse files Browse the repository at this point in the history
Compatibility update with kokkos@develop changes merged in
kokkos/kokkos#7394

Signed-off-by: Nathan Ellingwood <[email protected]>
  • Loading branch information
ndellingwood committed Oct 1, 2024
1 parent 9360f42 commit 1d24c17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/tpetra/core/src/Tpetra_Details_KokkosCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ namespace Details {

// Figure out what count bin to stick this in
int idx = (int) eid.type;
#if KOKKOS_VERSION >= 40499
if(eid.instance_id == int_for_synchronization_reason(SpecialSynchronizationCases::GlobalDeviceSynchronization))
#else
if(eid.instance_id == Impl::int_for_synchronization_reason(SpecialSynchronizationCases::GlobalDeviceSynchronization))
#endif
count_global[idx]++;
else
count_instance[idx]++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ namespace {
else if (eid.type == DeviceType::OpenACC) device_label+="OpenACC";
else if (eid.type == DeviceType::Unknown) device_label+="Unknown";
else device_label+="Unknown to Tpetra";

#if KOKKOS_VERSION >= 40499
if(eid.instance_id == int_for_synchronization_reason(SpecialSynchronizationCases::GlobalDeviceSynchronization))
device_label += " All Instances)";
else if(eid.instance_id == int_for_synchronization_reason(SpecialSynchronizationCases::DeepCopyResourceSynchronization))
device_label += " DeepCopyResource)";
#else
if(eid.instance_id == Impl::int_for_synchronization_reason(SpecialSynchronizationCases::GlobalDeviceSynchronization))
device_label += " All Instances)";
else if(eid.instance_id == Impl::int_for_synchronization_reason(SpecialSynchronizationCases::DeepCopyResourceSynchronization))
device_label += " DeepCopyResource)";
#endif
else
device_label += " Instance " + std::to_string(eid.instance_id) + ")";

Expand Down

0 comments on commit 1d24c17

Please sign in to comment.