Skip to content

Commit

Permalink
SYCL: UUID
Browse files Browse the repository at this point in the history
This was implemented a couple months ago, but I didn't have time to check
the correctness until now.
  • Loading branch information
WeiqunZhang committed Jul 19, 2023
1 parent 20f9d30 commit b587769
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Src/Base/AMReX_GpuDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ Device::Initialize ()

#elif defined(AMREX_USE_SYCL)

#if 0
auto const& d = *sycl_device;
if (d.has(sycl::aspect::ext_intel_device_info_uuid)) {
auto uuid = d.get_info<sycl::ext::intel::info::device::uuid>();
Expand All @@ -345,10 +344,20 @@ Device::Initialize ()
}
num_devices_used = uuid_counts.size();
num_device_partners = uuid_counts[my_uuid];
}
#else
num_device_partners = 1; // xxxxx SYCL: todo, also check memory available when implicit scaling is off.

#if 0
for (int i = 0; i < ParallelDescriptor::NProcs(); ++i) {
if (i == ParallelDescriptor::MyProc()) {
std::cout << "Proc. " << i << ": |";
for (auto x : uuid) {
std::cout << std::hex << static_cast<unsigned int>(x) << "|";
}
std::cout << std::endl;;
}
ParallelDescriptor::Barrier();
}
#endif
}

#endif

Expand Down

0 comments on commit b587769

Please sign in to comment.