TIM-VX/samples/multi_device
Kee c4e75674fa
Refine platform code and samples (#713)
* Refine platform code and samples

1. Support viplite v2 API
2. Unify the Lite and Native platform APIs so that the same code
   can run on different platforms through different compilation options.

Type: Code Improvement

Signed-off-by: Kee <xuke537@hotmail.com>

* Fix build error if VSI device API is not supported

Signed-off-by: Kee <xuke537@hotmail.com>

---------

Signed-off-by: Kee <xuke537@hotmail.com>
2025-10-13 13:15:31 +08:00
..
lenet add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
mobilenet add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
resnet50 add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
CMakeLists.txt add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
README Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
multi_device.cc Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
multi_device_demo.cc Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
vx_lenet.cc add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
vx_lenet.h add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
vx_mobilenet.cc add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
vx_mobilenet.h add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00
vx_resnet50.cc Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
vx_resnet50.h add test demo for multi_device (#371) 2022-04-29 22:54:03 +08:00

README

## brief
The multi_device demo uses some acuity exported tim-vx networks, and running on multi-core devices of NPU using platform api.

## note
Please note that if you have enabled lite platform, a dedicated VIVANTE_SDK(NO_KERNEL) is required as the compiler for NBG.
The driver for the NPU is the VIPLITE driver

##requirements
Vivante SDK >= 6.4.22
ovxlib >= 1.2.26
viplite >=2.0.0

## build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DTIM_VX_USE_EXTERNAL_OVXLIB=ON -DEXTERNAL_VIV_SDK=${VIVANTE_NOKERNEL_SDK_DIR} -DOVXLIB_INC=${OVXLIB_DIR}/include \
         -DOVXLIB_LIB=/path/to/libovxlib.so -DTIM_VX_BUILD_EXAMPLES=ON -DTIM_VX_ENABLE_PLATFORM=ON -DTIM_VX_ENABLE_PLATFORM_LITE=ON -DVIP_LITE_SDK=${VIP_LITE_SDK}

## environment
# Export VIV_GPU_FILE to specify the NPU hardware configuration file for the NBG compiler
# VIV_GPU_FILE Specify the NPU hardware configuration file for the NBG compiler
export VIV_GPU_FILE="/path/to/VIP9400NANOQ_PLUS_PID0X10000055.config"
export TIM_VX_ROOT="${workspaceFolder}/tim-vx"

## run
cd build
./samples/multi_device/multi_device