diff --git a/tools/util/include/cutlass/util/helper_cuda.hpp b/tools/util/include/cutlass/util/helper_cuda.hpp index 6edb028fb..62d393eb1 100644 --- a/tools/util/include/cutlass/util/helper_cuda.hpp +++ b/tools/util/include/cutlass/util/helper_cuda.hpp @@ -43,6 +43,22 @@ namespace cute void device_init(int device_id, bool quiet = false) { + +#if defined(CUTLASS_ENABLE_SYCL) + + syclcompat::select_device(device_id); + auto &device = syclcompat::get_current_device(); + + if (!quiet) { + printf("Using device %d: %s (%d Compute Units)\n", + device_id, device.get_device_info().get_name(), + device.get_max_compute_units() + ); + fflush(stdout); + } + +#else + cudaDeviceProp device_prop; std::size_t device_free_physmem; std::size_t device_total_physmem; @@ -65,6 +81,9 @@ device_init(int device_id, bool quiet = false) device_prop.multiProcessorCount); fflush(stdout); } + +#endif + } /**