
Earlier implementation of sysman events API was based on file creation in the filesystem. Whenever a uevent for some event which needs to be monitored arrive, at that time a file was created in the filesystem based on some preinstalled udev rules. This approach was inefficient as it heavily depends over file system and second with this approach losing events is always a possibility. Now with this change, we are removing our dependency over file creation in filesystem. Rather we will be using libudev library to monitor the uevents. This approach could also be extended, when we want to listen to all the uevents for all the gpu devices present in the system. Related-To: LOCI-2140 Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2.5 KiB
Building Level Zero
These instructions have been tested on Ubuntu* and complement those existing for NEO in the top-level BUILD.md file.
- Install/build Level Zero dependencies
To use Fabric related APIs, please build and/or install libnl-3.7.0.
If installing to a local folder, -DLIBGENL_INCLUDE_DIR=<local install folder path>/libnl/include/libnl3/
could be passed to the cmake line of NEO build(Please refer top-level BUILD.md).
To use Sysman events API, please build and/or install libudev-dev
- Install/build Level Zero loader and Level Zero headers
Install Level Zero loader and headers from https://github.com/oneapi-src/level-zero/releases.
For execution, only the level-zero package is needed; for compilation, level-zero-devel package is also required.
Alternatively, build Level Zero loader from source, as indicated in https://github.com/oneapi-src/level-zero.
Build will generate ze_loader library and symlinks, as well as those for ze_validation_layer.
- Install/build Level Zero driver
Install Level Zero package from https://github.com/intel/compute-runtime/releases.
Alternatively, follow instructions in top-level BUILD.md file to build NEO. Level Zero is built by default.
When built, ze_intel_gpu library and symlinks are generated.
- Build your application
Compilation needs to include the Level Zero headers and to link against the loader library:
g++ zello_world_gpu.cpp -o zello_world_gpu -lze_loader
If libraries not installed in system paths, include Level Zero headers and path to Level Zero loader:
g++ -I<path_to_Level_Zero_headers> zello_world_gpu.cpp -o zello_world_gpu -L<path_to_libze_loader.so> -lze_loader
- Execute your application
If Level Zero loader packages have been built and installed in the system, then they will be present in system paths:
./zello_world_gpu
Sample output:
Device :
* name : Intel(R) Graphics Gen9 [0x5912]
* type : GPU
* vendorId : 8086
Zello World Results validation PASSED
If libraries not installed in system paths, add paths to ze_loader and ze_intel_gpu libraries:
LD_LIBRARY_PATH=<path_to_libze_loader.so>:<path_to_libze_intel_gpu.so> ./zello_world_gpu
(*) Other names and brands may be claimed as property of others.