Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Device Drivers ->
	Multimedia support ->
  	Media drivers ->
    	ML Inference Processor VIP9000_NPU

Refer to the snapshot of the NPU Version choice menu below:

...

The NPU driver supports power management, allowing it to power . When loading the NPU driver with the ‘powerManagement=0’ parameter, the NPU power is turned on when the driver probes is probed and power turned off when the driver is removed. To enable this function, insert further save power, load the NPU driver with the ‘powerManagement=1’ parameter. Use This ensures that the NPU power is only turned on when the NPU is actively running.

1.3. Loading the NPU driver

To load the NPU driver (module), use the ‘modprobe’ command as shown below:

Code Block
languagebash
modprobe galcore powerManagement=1

or:

Code Block
modprobe galcore powerManagement=0

Here, 'galcore' is the module name of the NPU driver. The Linux kernel message when When the NPU driver is probing will look like thisbeing probed, the Linux kernel message will appear as follows:

Code Block
[   29.498289] galcore f8140000.galcore: NPU get power success
[   29.498971] galcore f8140000.galcore: galcore irq number is 44
[   29.499073] galcore f8140000.galcore: NPU clock: 900000000
[   29.503967] Galcore version 6.4.15.9.700103
[   29.509197] galcore f8140000.galcore: _SetPower 0 0 enable
[   29.518719] galcore f8140000.galcore: regulator enable success
[   29.519415] galcore f8140000.galcore: NPU ISO disable
[   29.524477] galcore f8140000.galcore: NPU HW reset SMS
[   29.529566] galcore f8140000.galcore: NPU HW reset deassert
[   29.535127] galcore f8140000.galcore: NPU HW clock enable
[   29.540803] galcore f8140000.galcore: _SetPower enable ret=0
[   29.546162] galcore f8140000.galcore: NPU clock enable success
[   29.559172] galcore f8140000.galcore: NPU clock disable success
[   29.559227] galcore f8140000.galcore: _SetPower 0 0 disable
[   29.563427] galcore f8140000.galcore: NPU HW clock disabled
[   29.568980] galcore f8140000.galcore: NPU HW reset assert
[   29.574355] galcore f8140000.galcore: NPU ISO enable
[   29.579308] galcore f8140000.galcore: regulator disable success
[   29.585206] galcore f8140000.galcore: _SetPower disable ret=0

Otherwise, use the ‘modprobe’ command as shown below:

Code Block
languagebash
modprobe galcore

Upon successful NPU driver probing, the NPU device ('galcore') will appear in the Linux device directory '/dev'.

Code Block
~ # ls -l /dev/galcore
crw-rw----    1 root     root      199,   0 Jan  1 00:00 /dev/galcore

2. NN Shared Libraries

...

Code Block
wells@wells-linux:~/Q654$ ll linux/rootfs/initramfs/prebuilt/vip9000sdk
total 20
drwxrwxr-x 7 wells wells 4096 Jun 12 21:31 ./
drwxrwxr-x 9 wells wells 4096 Jun 12 21:31 ../
drwxrwxr-x 4 wells wells 4096 Jun 12 21:31 6.4.13.8/
drwxrwxr-x 4 wells wells 4096 Jun 12 21:31 6.4.15.9/
drwxrwxr-x 4 wells wells 4096 Jun 12 21:31 6.4.18.5/

The

...

‘include’

...

subdirectory

...

includes

...

the

...

relevant

...

header

...

files:

Code Block
wells@wells-linux:~/Q654$ ll linux/rootfs/initramfs/prebuilt/vip9000sdk/6.4.15.9/include/
total 28
drwxrwxr-x  7 wells wells 4096 Jun 12 21:31 ./
drwxrwxr-x  4 wells wells 4096 Jun 12 21:31 ../
drwxrwxr-x  2 wells wells 4096 Jun 12 21:31 CL/
drwxrwxr-x  3 wells wells 4096 Jun 12 21:31 HAL/
drwxrwxr-x  2 wells wells 4096 Jun 12 21:31 jpeg/
drwxrwxr-x 12 wells wells 4096 Jun 12 21:31 ovxlib/
drwxrwxr-x  2 wells wells 4096 Jun 12 21:31 VX/

...

Code Block
languagebash
INCLUDES+=-I$(VIVANTENN_SDK_DIR)/include/HAL \
          -I$(VIVANTENN_SDK_DIR)/include/CL \
          -I$(VIVANTENN_SDK_DIR)/include/VX \
          -I$(VIVANTENN_SDK_DIR)/include/ovxlib \
          -I$(VIVANTENN_SDK_DIR)/include/jpeg

LIBS+=-lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -ljpeg -lovxlib

...

Code Block
languagebash
export LD_LIBRARY_PATH=/lib64:/lib:$LD_LIBRARY_PATH