mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Expand Level Zero BUILD.md
Change-Id: I92fc88f4407914e6b88c83b1ebdc83d8e5cc3c45 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
76ee6e3646
commit
65b9ba082b
@@ -1,30 +1,49 @@
|
||||
# Building Level Zero
|
||||
|
||||
These instructions have been tested on Ubuntu* and complement those existing for NEO.
|
||||
These instructions have been tested on Ubuntu* and complement those existing for NEO in the top-level BUILD.md file.
|
||||
|
||||
1. Install Level Zero loader
|
||||
1. Install Level Zero loader and Level Zero headers
|
||||
|
||||
Build and install Level Zero loader, as indicated in [https://github.com/oneapi-src/level-zero](https://github.com/oneapi-src/level-zero).
|
||||
Both packages generated from Level Zero loader are needed.
|
||||
Build Level Zero loader, as indicated in [https://github.com/oneapi-src/level-zero](https://github.com/oneapi-src/level-zero).
|
||||
|
||||
2. Build Level Zero driver with NEO
|
||||
Build will generate ze_loader library and symlinks, as well as those for ze_validation_layer.
|
||||
|
||||
This generates `libze_intel_gpu.so`.
|
||||
Optionally, two packages can be built: binary and devel.
|
||||
|
||||
3. Compile your application
|
||||
2. Build Level Zero driver
|
||||
|
||||
Compilation needs to include the Level Zero headers from the Level Zero loader and to link against the loader library.
|
||||
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.
|
||||
|
||||
Optionally, you may install Level Zero loader and driver packages.
|
||||
|
||||
3. Build your application
|
||||
|
||||
Compilation needs to include the Level Zero headers and to link against the loader library:
|
||||
|
||||
```shell
|
||||
g++ ~/zello_world.cpp -o zello_world -lze_loader
|
||||
g++ zello_world.cpp -o zello_world -lze_loader
|
||||
```
|
||||
|
||||
If libraries not installed in system paths, include Level Zero headers and path to Level Zero loader:
|
||||
|
||||
```shell
|
||||
g++ -I<path_to_Level_Zero_headers> zello_world.cpp -o zello_world -L<path_to_libze_loader.so> -lze_loader
|
||||
```
|
||||
|
||||
4. Execute your application
|
||||
|
||||
Set your paths to find the ze_loader and the ze_intel_gpu libraries if not present in standard paths.
|
||||
If Level Zero loader packages have been built and installed in the system, then they will be present in system paths:
|
||||
|
||||
```shell
|
||||
./zello_world
|
||||
```
|
||||
|
||||
___(*) Other names and brands may be claimed as property of others.___
|
||||
If libraries not installed in system paths, add paths to ze_loader and ze_intel_gpu libraries:
|
||||
|
||||
```shell
|
||||
LD_LIBRARY_PATH=<path_to_libze_loader.so>:<path_to_libze_intel_gpu.so> ./zello_world
|
||||
```
|
||||
|
||||
___(*) Other names and brands may be claimed as property of others.___
|
||||
Reference in New Issue
Block a user