From 65b9ba082b555ce1e61c541f37f41d04f3150ea9 Mon Sep 17 00:00:00 2001 From: Jaime Arteaga Date: Fri, 6 Mar 2020 10:02:29 -0800 Subject: [PATCH] Expand Level Zero BUILD.md Change-Id: I92fc88f4407914e6b88c83b1ebdc83d8e5cc3c45 Signed-off-by: Jaime Arteaga --- level_zero/doc/BUILD.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/level_zero/doc/BUILD.md b/level_zero/doc/BUILD.md index d00548f0ae..abc6f26ce4 100644 --- a/level_zero/doc/BUILD.md +++ b/level_zero/doc/BUILD.md @@ -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 zello_world.cpp -o zello_world -L -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=: ./zello_world +``` + +___(*) Other names and brands may be claimed as property of others.___ \ No newline at end of file