Skip to content
Failed

Changes

Summary

  1. Add runtime function to query the number of devices and make device ID consistent with `KOKKOS_VISIBLE_DEVICES` (#6713) (details)
  2. Clean up test case (details)
Commit d2913cb3895c05c20055a86756f11e2c6b2b3bed by noreply
Add runtime function to query the number of devices and make device ID consistent with `KOKKOS_VISIBLE_DEVICES` (#6713)

* Make Kokkos::device_id consistent with KOKKOS_VISIBLE_DEVICES

* Mask visible devices in CUDA/HIP::print_config

* fixup! Make Kokkos::device_id consistent with KOKKOS_VISIBLE_DEVICES

* Add Kokkos::num_devices() -> int

* Let num_devices() return -1 when no device backend is enabled

* Update device and threads unit test

* Skip num_devices and device_id tests if KOKKOS_VISIBLE_DEVICES env var is defined

* Fix device_id test with SYCL

* Fix HIP test GetDevice[Count]

* Enable device initialization testing for OpenMPTarget

As far as I understand it was resolved in #5492

* Improve error message when the device id cannot be determined
The file was modified core/src/HIP/Kokkos_HIP_Instance.cpp (diff)
The file was modified core/src/Cuda/Kokkos_Cuda_Instance.cpp (diff)
The file was modified core/unit_test/UnitTest_DeviceAndThreads.cpp (diff)
The file was modified core/unit_test/TestDeviceAndThreads.py (diff)
The file was modified core/src/impl/Kokkos_DeviceManagement.hpp (diff)
The file was modified core/src/impl/Kokkos_Core.cpp (diff)
The file was modified core/src/Kokkos_Core.hpp (diff)
The file was modified core/unit_test/CMakeLists.txt (diff)
The file was modified core/unit_test/TestTeam.hpp (diff)