Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

level-zero vs opencl

Daniel_D
Novice
3,409 Views

Hi,

 

If there any guide when to select the level-zero device and when to select the opencl device?

 

Platform = Intel(R) OpenCL HD Graphics
GPU Intel(R) Corporation - Intel(R) UHD Graphics

 

Platform = Intel(R) Level-Zero
GPU Intel(R) Corporation - Intel(R) Graphics [0x9b41]

 

This is the same CPU and HD Graphics. It is listed as OpenCL device as well as a Level-Zero device. I couldn't find much information when to use which platform.

 

I want to use it with the DPC++ compiler and sycl. Any recommandations?

 

Thanks,

Daniel

 

0 Kudos
5 Replies
NoorjahanSk_Intel
Moderator
3,364 Views

Hi,


Thanks for posting in Intel Communities.


Intel DPC++ compiler can be used with different backends (e.g., OpenCL and Level Zero). Different devices can be operated through different low-level drivers, such as OpenCL for FPGA


By default, if no special action is taken and the Level Zero runtime reports support the installed GPU on Linux.

On Windows, the preference is given to an OpenCL GPU.

Devices that are not supported with the Level Zero runtime (CPU/FPGA) continue to run with OpenCL.

OpenCL supports both CPU and GPU architectures where as level_zero supports FPGA and other types of accelerator architectures.


In your case, you are observing the same GPU under OpenCL and Level Zero because it is managed by an OpenCL™ or Level Zero backend.

You can choose any of the backends (OpenCL or Level Zero) to build your application on GPU.


Please refer to the below links for more details:

https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-1/intel-oneapi-level-zero-switch.html

https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-1/programming-with-intel-oneapi-level-zero-backend.html


Thanks & Regards,

Noorjahan.


0 Kudos
Daniel_D
Novice
3,345 Views

Hi,

 

Thanks for the detailed response. Is there a way to identify a Level-Zero device if I enumerate through all SYCL devices other than a string-compare of the backend name? That seems to me not very reliable for the future.

 

Thanks.

0 Kudos
NoorjahanSk_Intel
Moderator
3,285 Views

Hi,

 

>>Is there a way to identify a Level-Zero device

 

Yes, you can identify a level_zero device using programming API sycl::backend::ext_oneapi_level_zero.

 

Please refer to the below link for more details:

https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-1/intel-oneapi-level-zero-backend-specification.html

 

Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
3,235 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
3,168 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply