Developer Guide and Reference

  • 2022.2
  • 09/08/2022
  • Public Content

DPCT1093

Message

The
<Device ID>
device may be not the one intended for use. Adjust the selected device if needed.

Detailed Help

The
cudaSetDevice
function sets the device to run the code on. After migration to SYCL*, the logic for device selection may need to be updated.
For example, this original CUDA* code:
int main( int argc, char** argv) { cudaSetDevice(1); // Device 1 is the best choice in the original code. foo(argc, argv); }
results in the following migrated SYCL code:
int main( int argc, char** argv) { /* DPCT1093 */ dpct::dev_mgr::instance().select_device(1); // Device 1 maybe not the best choice in SYCL. foo(argc, argv); }
which is manually adjusted to:
int main( int argc, char** argv) { dpct::dev_mgr::instance().select_device(0); foo(argc, argv); }

Suggestions to Fix

Review and adjust the device selection logic if needed.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.