@@ -30,7 +30,7 @@ SPDX-License-Identifier: MIT
3030 │ User Mode Driver │ │ NPU compiler │
3131 │ │ │ │
3232 │ intel-level-zero-npu ◀═══▶ intel-driver-compiler-npu │
33- │ (libze_intel_vpu .so) │ │ (libnpu_driver_compiler.so) │
33+ │ (libze_intel_npu .so) │ │ (libnpu_driver_compiler.so) │
3434 │ │ │ │
3535 └──────────────────▲──────────────────┘ └────────────────────────────────────────┘
3636 ╚════════════════════╗
@@ -51,6 +51,15 @@ SPDX-License-Identifier: MIT
5151
5252## Changelog
5353
54+ <details >
55+ <summary >Driver library name change from libze_intel_vpu.so to libze_intel_npu.so (from v1.16.0)</summary >
56+
57+ Starting from v1.16.0 release the driver library name has been changed from ` libze_intel_vpu.so ` to
58+ ` libze_intel_npu.so ` . The old library name is still supported for backward compatibility in Level
59+ Zero loader, but it is recommended to use the new library name. Using an older version of Level Zero
60+ than v1.17.17 requires to keep the old library name.
61+
62+ </details >
5463
5564<details >
5665<summary >zeMutableCommandList extension implementation (from v1.6.0)</summary >
@@ -111,7 +120,7 @@ set, the `ZE_INTEL_NPU_LOGMASK` allows to target specific log group. The log
111120group are listed in
112121[ umd/vpu_driver/source/utilities/log.hpp] ( ../umd/vpu_driver/source/utilities/log.hpp#L19 )
113122
114- ```
123+ ``` bash
115124# Set log level to INFO
116125export ZE_INTEL_NPU_LOGLEVEL=INFO
117126
@@ -147,7 +156,7 @@ and set "modularize" for `Intel NPU (Neural Processing Unit)`.
147156<details >
148157<summary >Finding the intel_vpu kernel module in the system</summary >
149158
150- ```
159+ ``` bash
151160# check if the intel_vpu exists is in the system
152161modinfo intel_vpu
153162
@@ -165,16 +174,24 @@ ls /dev/accel/accel0
165174```
166175</details >
167176
177+ ## Driver package installation
178+
179+ The driver binary package and installation process can be found in the [ release
180+ page] ( https://github.com/intel/linux-npu-driver/releases ) . The list of disbributed packages:
181+ * intel-fw-npu: firmware binaries
182+ * intel-level-zero-npu: user space driver library with name libze_intel_npu.so
183+ * intel-driver-compiler-npu: NPU compiler library with name libnpu_driver_compiler.so
184+
168185## Building a standalone driver
169186
170187Install the required dependencies in Ubuntu:
171- ```
188+ ``` bash
172189sudo apt update
173190sudo apt install -y build-essential git git-lfs cmake python3
174191```
175192
176193Commands to build the driver:
177- ```
194+ ``` bash
178195cd linux-npu-driver
179196git submodule update --init --recursive
180197
@@ -197,8 +214,8 @@ Compiler-in-Driver component from [NPU compiler repository](https://github.com/o
197214OpenVINO runtime is required by compiler. About the dependencies for building OpenVINO,
198215please check the [ OpenVINO build document] ( https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md ) .
199216
200- To build a compiler from the driver repository the ` ENABLE_NPU_COMPILER_BUILD ` flag has to be set:
201- ```
217+ To build a compiler the ` ENABLE_NPU_COMPILER_BUILD ` flag has to be set:
218+ ``` bash
202219cd linux-npu-driver
203220git submodule update --init --recursive
204221
@@ -226,7 +243,7 @@ The binary `npu-umd-test` is located in the build folder, ex. `build/bin/`.
226243
227244Command line to run functional tests (after driver installation):
228245
229- ```
246+ ``` bash
230247npu-umd-test
231248```
232249
@@ -236,7 +253,7 @@ control the inference test content. Those tests require compiler in system.
236253
237254Config file requires to download any OpenVINO model. Command line to setup a
238255` basic.yaml ` :
239- ```
256+ ``` bash
240257# Prepare the add_abc model in path pointed by basic.yaml
241258mkdir -p models/add_abc
242259curl -o models/add_abc/add_abc.xml https://raw.githubusercontent.com/openvinotoolkit/openvino/master/src/core/tests/models/ir/add_abc.xml
@@ -250,12 +267,54 @@ More information about config can be found in [validation/umd-test/configs](/val
250267
251268## Troubleshooting
252269
270+ <details >
271+ <summary >Device is not detectable</summary >
272+
273+ To check if device is available the user can use ` npu-umd-test ` or ` hello_query_device ` from the OpenVINO sample applications.
274+ To debug missing NPU device, the ` strace ` allows to trace system calls that initalize the device. Run test command with ` strace ` :
275+
276+ ``` bash
277+ # Record system calls using strace and npu-umd-test
278+ strace -o strace.log --trace=file ./build/bin/npu-umd-test
279+ ...
280+ # Or using OpenVINO python API
281+ strace -o strace.log --trace=file python -c " from openvino import Core; print(Core().available_devices)"
282+ ...
283+ ```
284+ > [ !WARNING]
285+ > After v1.16.0 release the driver library has a libze_intel_npu.so.1 name. If you are using
286+ > libze_intel_vpu.so.1 by mistake, please remove it from system
287+
288+ Analyze the ` strace.log ` file for system calls that open NPU libraries and device:
289+
290+ ``` bash
291+ grep -E " (accel|libnpu_|libze_)" strace.log
292+ # Below output from command
293+ ...
294+ # Check if the Level Zero loader is found in system
295+ openat(AT_FDCWD, " /lib/x86_64-linux-gnu/libze_loader.so.1" , O_RDONLY| O_CLOEXEC) = 3
296+ ....
297+ # libze_intel_vpu.so.1 should not be used after v1.16.0 release, consider to remove it if it is in the system
298+ openat(AT_FDCWD, " /usr/lib/x86_64-linux-gnu/libze_intel_vpu.so.1" , O_RDONLY| O_CLOEXEC) = -1 ENOENT (No such file or directory)
299+ ...
300+ # Check if driver library is found
301+ openat(AT_FDCWD, " /lib/x86_64-linux-gnu/libze_intel_npu.so.1" , O_RDONLY| O_CLOEXEC) = 3
302+ ...
303+ # Check if driver successfully opened accel0. If unsuccessful, check next section
304+ openat(AT_FDCWD, " /dev/accel/accel0" , O_RDWR| O_NOFOLLOW| O_CLOEXEC) = 3
305+ ...
306+ # Check if compiler was found
307+ openat(AT_FDCWD, " /lib/x86_64-linux-gnu/libnpu_driver_compiler.so" , O_RDONLY| O_CLOEXEC) = 3
308+ ...
309+ ```
310+ </details >
311+
253312<details >
254313<summary >Non-root access to the NPU device</summary >
255314
256315To access the NPU device, the user must be in the "render" or "video" group.
257316A group depends on system configuration:
258- ```
317+ ``` bash
259318# check user groups
260319groups
261320
@@ -271,7 +330,7 @@ but might not be available in your Linux distribution. See
271330
272331If setting the "render" group does not resolve the non-root access issue,
273332this must be done by an administrator manually:
274- ```
333+ ``` bash
275334# check device permissions
276335ls -l /dev/accel/
277336
@@ -286,50 +345,44 @@ $ ls -lah /dev/accel/accel0
286345crw-rw---- 1 root render 261, 0 Jan 31 15:58 /dev/accel/accel0
287346```
288347</details >
348+
289349<details >
290350<summary >Compilation problem due to lack of memory</summary >
291351
292- The compilation may fail due to memory shortage. The recommendation is to
293- use the Ninja generator instead of Unix Makefiles. If it does not help, please
352+ The compilation may fail due to memory shortage. The recommendation is to use the Ninja generator
353+ instead of Unix Makefiles and extending swap memory . If it does not help, please
294354[ file a new issue] ( https://github.com/intel/linux-npu-driver/issues/new ) .
295355
296- ```
297- # install Ninja
298- sudo apt update
299- sudo apt install -y ninja-build
300-
301- # remove the old build and create a new one
302- rm build -rf
303- cmake -B build -S . -G Ninja
304- ```
305356</details >
357+
306358<details >
307359<summary >Enable driver log using an environment variable</summary >
308360
309361Valid logging levels are ` ERROR ` , ` WARNING ` , ` INFO ` (and ` VERBOSE ` for driver
310362older than v1.5.0 release)
311363
312364Seting the logging level using the ` ZE_INTEL_NPU_LOGLEVEL ` environment variable:
313- ```
365+ ``` bash
314366export ZE_INTEL_NPU_LOGLEVEL=< logging_level>
315367```
316368
317369Command to clear an exported value:
318- ```
370+ ``` bash
319371unset ZE_INTEL_NPU_LOGLEVEL
320372```
321373
322374Setting ` ZE_INTEL_NPU_LOGMASK ` allows to print specific log groups in driver.
323375The log group are listed in
324376[ umd/vpu_driver/source/utilities/log.hpp] ( ../umd/vpu_driver/source/utilities/log.hpp#L19 )
325377
326- ```
378+ ``` bash
327379# Set log level to INFO to enable LOGMASK
328380export ZE_INTEL_NPU_LOGLEVEL=INFO
329381
330382# Set log mask to only print from DEVICE, DRIVER and CACHE groups
331383export ZE_INTEL_NPU_LOGMASK=$(( 1 << 4 | 1 << 3 | 1 << 17 ))
332384```
385+
333386</details >
334387
335388<details >
@@ -338,17 +391,16 @@ export ZE_INTEL_NPU_LOGMASK=$((1<<4|1<<3|1<<17))
338391The user can use different kernel and firmware combination for NPU device. The
339392user might receive the following error message:
340393
341- ```
394+ ``` bash
342395ERROR! MAPPED_INFERENCE_VERSION is NOT compatible with the ELF Expected: 6.1.0 vs received: 7.0.0
343396```
344397
345398It means that NPU compiler mismatches the NPU firmware. To fix this issue the
346399user needs to upgrade the firmware. Firmware update should be done from
347400driver repository using release tag that matches the NPU compiler:
348401
349- ```
402+ ``` bash
350403cmake -B build -S .
351404cmake --install build/ --component fw-npu --prefix /
352405```
353-
354- </details >
406+ </details >
0 commit comments