Developer Guide and Reference


Intel® oneAPI Level Zero Switch

Intel® oneAPI Level Zero Introduction

Data Parallel C++ (
is just one of the many components of the
project. The Intel® oneAPI Level Zero (Level Zero) API provides low-level direct-to-metal interfaces that are tailored to the devices on a
project. While heavily influenced by other low-level APIs, such as OpenCL™ API, Level Zero is designed to evolve independently.
More information on Level Zero is available in the oneAPI Specification.

Packages to Install

The packages you must install are

Level Zero Loader

Level Zero is supportable across different
compute device architectures. The Level Zero loader discovers all Level Zero drivers in the system. In addition, the Level Zero loader is also the Level Zero software development kit: It carries the Level Zero headers and libraries where you build Level Zero programs.
The Level Zero loader does not come with
and therefore must be installed independently.
More information about the Level Zero loader is available in the Loader section.

Level Zero GPU Driver

The first Level Zero driver was created to support an Intel graphics processing unit (GPU): Gen9+. The driver is open-source and regular public releases are maintained. It does not come with
and therefore must be installed independently. The Level Zero driver and OpenCL™ Driver come in the same package. More info about the Level Zero driver is available at GitHub.


targets a variety of devices: CPU, GPU, and Field Programmable Gate Array (FPGA). Different devices can be operated through different low-level drivers, such as OpenCL for FPGA. The Plugin Interface (PI) is a unified
API for working with different devices in a unified way. Plugins of
implement specific translations of the PI API into low-level runtime. The Level Zero PI Plugin was created in
to enable devices supported through the Level Zero system. More information on PI is available at GitHub.
Device Selection
The PI for
performs device discovery of all available devices through all available PI plugins. The same physical hardware device can be seen as multiple different
devices if multiple plugins support it (for example, OpenCL Gen90 and Level Zero Gen90). The
runtime performs device selection from the available devices based on device selectors. The device selectors can be user-defined or built in (for example,
Discovery of Multiple PI Plugins
The implication of support for the discovery of multiple plugins is that the same GPU card can be seen as multiple different GPU devices available under different PI plugins.
Corresponding runtimes (OpenCL and/or Level Zero) must be installed correctly and independently for PI to see their devices. The
/SYCL* specification does not define which device will be used if there are multiple devices that match criteria (for example,
Default Preference is Given to a Level Zero GPU on Linux*
By default, if no special action is taken and the Level Zero runtime reports support for the installed GPU, then the
runtime uses the installed GPU. This is true for standard built-in device selectors and custom device selectors, where no action is taken to change the default behavior.
Currently, 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.
How to Change the Default Preference
Use the
environment variable to change the default preference. The valid values are
For example, if you specify
and the PI OpenCL plugin reports the availability of the device of the required type, then that device is used. It overrides the default preference that is given to the Level Zero GPU, if the GPU is supported by the installed version of OpenCL.
setting only works when there are multiple choices.
If your code does not work, try running it with
to see if the problem is related to Level Zero.
How to See Where the Code is Running
Use the
environment variable to see where your code is running. It reports the choice made by the built-in device selectors, if they are used.
to enable verbose tracing of the PI and show all the devices detected by the PI discovery process.
How to Load all SYCL Plugins Discovered in the System
Use the
utility to load all the SYCL plugins on your system. This utility also queries all the platforms and devices available through the plugins.
Verbose output is available with
$ sycl-ls --verbose
, which gives you the same choice that would be made by a standard built-in device selector.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at