ascend-nlp-operator

Runs operator accuracy and latency benchmarks on Huawei Ascend 910B NPUs.

7|1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/DeepLink-org/DeepEval-Skills --skill ascend-nlp-operator-deeplink-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ascend-nlp-operator
Source: https://github.com/DeepLink-org/DeepEval-Skills/tree/main/skills/Ascend/nlp/ascend-nlp-operator
Command: npx skills add https://github.com/DeepLink-org/DeepEval-Skills --skill ascend-nlp-operator-deeplink-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, torch_npu, pandas, and includes scripts (resource) components.

What problem does it solve? Validating operator correctness and measuring performance on Huawei Ascend 910B NPUs requires coordinating CANN toolchains, native ACLNN binaries, torch_npu scripts, and strict result contracts, which is error-prone when done manually. ## Core Features & Use Cases - Accuracy Validation: Compares FP32/FP16 operator outputs on the 910B against freshly generated CPU ground-truth references. - Native Performance Benchmarks: Measures GEMM (448 cases), CUDA-style Conv2d forward plus dual backward (126 cases), FP32/FP16 LongTail operators (80 cases), and FP32 Transformer encoder/decoder inference latency. - Result Contract 2.0 Collection: Validates case identities, finite positive latencies, workload fingerprints, and run tokens, then atomically publishes a standardized result.json. - Use Case: An engineer evaluating Ascend 910B operator support launches the verified container, runs the GEMM benchmark via the provided runner, and obtains a validated result.json with per-case latencies and p50/p95 summary metrics. ## Quick Start Ask the agent to run the Ascend 910B GEMM operator benchmark and collect the Result Contract 2.0 output.

Frequently Asked Questions about ascend-nlp-operator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I benchmark GEMM operators on Ascend 910B?

Run the run_native.py script with --benchmark gemm inside the verified Ascend container. It rebuilds the native ACLNN binary, executes all 224 FP16 and 224 FP32 shapes in one batched process, and writes measured latencies into the baseline column of the result CSVs.

How to run operator accuracy validation on Ascend NPU?

Use run_accuracy.py with --regenerate-cpu-reference to first generate fresh CPU ground truth, then compare 910B outputs against it. Validator exit code 2 is accepted because failed accuracy cases are valid measurements, not executor failures.

What benchmarks does the Ascend operator evaluation support?

It supports five test cases: accuracy, native CANN GEMM, CUDA-style Conv2d with forward plus dual backward, FP32/FP16 LongTail operators, and FP32 Transformer encoder/decoder inference. Each test case maps to its own BenchmarkSpec and must run as a separate task.

Why does the Ascend benchmark fail with acl.h or aclnn_mm.h not found?

This error means the container image lacks the complete CANN Toolkit or the matching 910B ops package. Fix the image and rerun rather than mounting extra host directories, since the skill forbids overriding the built-in /workspace/operators project.

Can I use torch_npu GEMM results for the GEMM BenchmarkSpec?

No. The GEMM BenchmarkSpec requires the native ACLNN path where all CSV shapes execute in one process with ACL Event timing. Framework-based torch_npu results are only allowed if a separate spec and version are established for that path.

What environment variables are required for Ascend operator benchmarking?

AIBenchAgent must inject AIBENCH_TASK_ID, AIBENCH_WORKLOAD_FINGERPRINT, and four AIBENCH_BENCHMARK_* variables. Host-side OPERATOR_RESULTS_DIR and OPERATOR_LOGS_DIR must be mounted to /workspace/results and /workspace/logs for outputs and logs.