← Back to Docs

HiSilicon (Hi3519DV500)

HiSilicon Hi3519DV500 with SVP NNIE NPU

The Hi3519DV500 SoC features a dedicated NPU (Neural Processing Unit) based on Huawei's SVP NNIE architecture. The soundSDK leverages this NPU for low-power, real-time sound inference.

Key Characteristics

Item
Detail
CPU
Dual-core ARM Cortex-A55 @ 1GHz
NPU
SVP NNIE (INT8 only — no FP32/FP16 NPU support)
NPU Model Format
`.om` (DaVinci offline model, via ATC tool)
Audio Capture
MPP SDK (`ss_mpi_ai_*`)
Capture Type String
`"mpp"`
Engine Type String
`"svp_acl"`
Cross-Compiler
`aarch64-v01c01-linux-gnu-gcc`

Important: INT8 Only

HiSilicon's NPU only supports INT8 quantized inference. The ATC compiler converts floating-point ONNX models to INT8 via calibration. Use compile_mode=0 (A8W8 — both activations and weights quantized to 8-bit).

Model Preparation Pipeline

# Step 1: Generate calibration data (on Windows)
cd c/py
python generate_calibration.py   # produces 500 .bin files + calibration_data.bin

# Step 2: Export ONNX model (on Windows)
python export_model_onnx.py \
    --model ../../path/to/trained/model.h5 \
    --output cry_detect.onnx

# Step 3: Convert ONNX → INT8 .om (on Linux with HiSilicon SDK)
atc --model=cry_detect.onnx \
    --framework=5 \
    --output=cry_detect_int8_v4 \
    --soc_version=Hi3519DV500 \
    --input_shape="input:1,1,225,225" \
    --input_format=NCHW \
    --image_list=calibration/calibration_data.bin \
    --compile_mode=0

Build

cd c/hisi3519
NPU=1 ./build.sh

Output: cry_detect (ARM64 executable, linked against libsvp_acl)

Deploy to Target

# Copy to SD card via SCP
scp cry_detect cry_detect_int8_v4.om root@192.168.0.106:/mnt/sdcard/

# Run (NPU mode)
./cry_detect -f test.wav -e svp_acl -w cry_detect_int8_v4.om

# Verify against CPU baseline
./cry_detect -f test.wav -e pure_c -w model_weights.bin

Accuracy Verification

INT8 quantization typically introduces < 0.02 probability difference vs. float32. Compare outputs to validate:

# NPU inference
./cry_detect -f test.wav -e svp_acl -w cry_detect_int8_v4.om

# CPU inference (reference)
./cry_detect -f test.wav -e pure_c -w model_weights.bin

Known Limitations

1. The NPU requires padded input: 225×225 → 225×228 (3 zero-padded columns per row)

2. Output tensor is [1,4] instead of [1,2] due to dequantization parameters

3. The svp_acl engine is built via conditional compilation (NPU=1) — the standard build does not include NPU support