Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications
333 Discussions

Creating a SYCL device from a Level Zero device

sogartar
Beginner
291 Views

I have an Level Zero device i.e. ze_device_handle_t coming from the outside. I want to create a cl::sycl::device from it. Is there functionality to do that?

 

Do I have to list all SYCL devices with cl::sycl::device::get_devices() and then try to match the one I have by its UUID with device.get_info<cl::sycl::info::device::ext_intel_device_info_uuid>()?

Would SYCL devices that map to the same physical device but with different backends like Level Zero or OpenCL have the same UUIDs? How can I select the Level Zero device?

 

Labels (1)
0 Kudos
1 Solution
Xiaoping_D_Intel
Employee
274 Views

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-an... provides the info about how to constructs a SYCL device instance from a Level Zero  "ze_device_handle_t"

 

Thanks,

Xiaoping

View solution in original post

3 Replies
Xiaoping_D_Intel
Employee
275 Views

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-an... provides the info about how to constructs a SYCL device instance from a Level Zero  "ze_device_handle_t"

 

Thanks,

Xiaoping

SeshaP_Intel
Moderator
220 Views

Hi,


Thanks for accepting the solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks and Regards,

Pendyala Sesha Srinivas


sogartar
Beginner
167 Views


Although, make_device is the correct API way to make the sycl device you may run into this error https://github.com/intel/llvm/issues/5769.

Reply