OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
GPU plugin Level Zero support
OpenVINO GPU plugin can be compiled with experimental Level Zero support. When enabled, plugin will use Level Zero as GPU compute API instead of OpenCL. Level Zero is the better-performing runtime on Xe2 and newer Intel GPU architectures; on pre-Xe2 GPUs, it is not supported.
For an example of integrating OpenVINO into a Level Zero application, see the Hello Remote Tensor C++ sample.
How to build with Level Zero support
- Configure cmake with the following additional option:
-DGPU_RT_TYPE=ZE
- Build OpenVINO
cmake --build . --config Release
How to check what runtime is used
With DEBUG_CAPS cmake option
- Prerequisite: Build OpenVINO with DEBUG_CAPS cmake option
- Set
OV_VERBOSE=1environment variable. - Run workload
- Find what variant of stream is reported in the logs (
ze_streamorocl_stream)- Example output for Level Zero runtime:
ze_stream: [GPU] Created Level Zero stream
- Example output for Level Zero runtime:
Without DEBUG_CAPS
- Check which libraries are loaded at runtime.
- On Linux, use
straceto confirm that Level Zero libraries are loaded. - On Windows, use
Process Explorerto confirm that Level Zero libraries are loaded. - If you see Level Zero libraries such as
ze_loader.dllandze_intel_gpu64.dll, Level Zero is in use.
- On Linux, use
- Use clintercept to check whether any OpenCL calls are made.
- If no OpenCL calls appear, Level Zero is in use.
Limitations
- This is an experimental, single-runtime build: the resulting plugin binary talks to the GPU over Level Zero only and cannot fall back to OpenCL.
- To ship both OpenCL and Level Zero runtimes side by side, with automatic per-device selection, see GPU dual-runtime dispatch (COMBINED build) instead.
- For OpenCL-based remote context/tensor interop while running on the Level Zero runtime, see Level Zero - OpenCL interoperability.