2 min read
•2026-10-07

Delivering One Vision Algorithm to Both Rockchip and Hisilicon: How to Split Deployment Packages and Test Baselines?

推广 Banner

When delivering to both Rockchip and Hisilicon platforms simultaneously, many teams' first reaction is to maintain two sets of code, two deployment packages, and a separate test baseline for each. But after just a few algorithm version iterations, the cost of dual-line maintenance quickly exceeds development itself. A more sensible approach is to separate "algorithm logic" from "platform adaptation," so a single core codebase can produce predictable results across different chips.

At the deployment package level, it is recommended to split into a "core inference package + platform adaptation layer." The core inference package contains only the model, common pre-processing/post-processing operators, and business logic. This part is chip-agnostic, and the compiled output can be ONNX or a proprietary intermediate representation. The adaptation layer wraps the Rockchip RKNN toolchain and Hisilicon SVP/IVE, translating the core package into runtime instructions for the corresponding chip and handling low-level differences such as memory allocation and operator mapping. This way, every algorithm update only requires replacing the core package, while the adaptation layer remains largely untouched. If the chip SDK is upgraded, only the adaptation layer is modified, not the algorithm logic.

Test baselines need to be more granular. Simply running the same test set on both platforms is not enough, because the two platforms naturally differ in operator precision and numerical behavior. Forcing exact alignment will only drag the team into endless tuning. It is recommended to split into three layers. The first layer is the algorithm effectiveness baseline, which uses standard datasets (such as internally annotated test sets) to verify metrics like mAP and recall. This layer only cares about the algorithm's own output, regardless of platform. The second layer is the platform consistency baseline, which focuses on comparing output differences between the two platforms under the same input, for example maximum absolute error at the tensor level or cosine similarity, with an allowed tolerance range rather than requiring exact equality. The third layer is the performance baseline, which separately measures per-frame latency, memory usage, and first-frame delay on Rockchip and Hisilicon. These thresholds must be set separately because the chips' compute power and memory architecture are inherently different.

In practice, there is an easily overlooked detail: test data should be dynamically partitioned by platform. Some operators have hardware acceleration on one platform but may fall back to software emulation on another, leading to significant differences in quantized and non-quantized conditions. Therefore, the baseline should include "platform-specific test cases" that cover scenarios sensitive to instruction sets. At the same time, the CI process should allow the same core package to trigger pipelines on both platforms, each generating its own test report, but linked by the same version number. This way, when delivering, the customer receives one core version plus the corresponding platform adaptation package, and the test reports clearly indicate the conclusions against each baseline. This avoids the superficial approach of using one report for both platforms and reduces redundant work for maintainers. Ultimately, the purpose of splitting is not to reduce workload, but to make each component's responsibility boundary clearer so that when problems arise, it is easy to quickly identify whether the algorithm is at fault or the adaptation is not done well.

Published on 2026-10-07