TIM-VX/samples/platform_sample
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
..
CMakeLists.txt Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
README Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00
platform_sample.cc Refine platform code and samples (#713) 2025-10-13 13:15:31 +08:00

README

## brief
The platform sample usage which use 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=${VIVANTE_NOKERNEL_SDK_DIR}/drivers/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
export VIV_GPU_FILE="/path/to/VIP9000NANOQ_PLUS_PID0X100000XX.config"

## run
cd build
./samples/platform_sample/platform_sample