Skip to content

feat(cambricon): extend native model operator coverage - #1027

Open
hot-strip371 wants to merge 1 commit into
InfiniTensor:masterfrom
hot-strip371:feat/cambricon-native-operators
Open

hot-strip371 wants to merge 1 commit into
InfiniTensor:masterfrom
hot-strip371:feat/cambricon-native-operators

Conversation

@hot-strip371

Copy link
Copy Markdown

Summary

  • Add reusable native Cambricon operators and extend the existing Argmax with axis reduction. Keep the upstream implementations for whole-tensor Argmax, GELU, ReLU, and other already-supported cases.
  • Preserve FP32/FP16 CNNL paths, support older BANG toolchains, and export the generated dispatch entry points in native-only Cambricon builds.

Motivation

InfiniTensor's ONNX execution path needs native Cambricon coverage for indexing, normalization, spatial operators, and floating-point and integer tensor operations. The changes stay within the existing backend and its operator interfaces.

Type of Change

  • feat

Platforms Affected

  • Cambricon (WITH_CAMBRICON)
  • Build system / CMake (Cambricon-specific paths)

Smoke Test Result

Native-only InfiniOps and InfiniTensor builds passed on MLU370-S4. InfiniTensor's native Cambricon ONNX operator regressions passed, including FP16, axis Argmax, and exact INT64 Add/Sub. The integrated run also passed 44 C++ tests, 42 ONNX frontend tests, and model replays for CLIP, SAM3 images/video, Qwen3-VL FP32/FP16, and DOTA FP32/FP16.

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
Cambricon Yes Passed Native operator and downstream model regressions passed on MLU370-S4.
CPU, NVIDIA, Iluvatar, MetaX, Moore, Ascend No backend changes Not run No claim of cross-platform validation.

Benchmark / Performance Impact

On the same MLU370-S4 and FP32 inputs, the final candidate averaged 13.25 ms/image for the raw DOTA model forward. Qwen3-VL output tokens matched PyTorch on all three comparison requests. The results are downstream integration measurements, not isolated InfiniOps microbenchmarks.

Notes for Reviewers

The matching InfiniTensor change depends on this PR. InfiniRT is used at its existing upstream commit cd1d482; it needs no separate change. No model weights, benchmark inputs, or build outputs are included.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant