ascendc-blaze-migration

Migrates AscendC kernels to Blaze Tensor API through gated serial validation.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill ascendc-blaze-migration-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ascendc-blaze-migration
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/ascendc-blaze-migration
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill ascendc-blaze-migration-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Migrating AscendC device kernels from ops-nn or ops-transformer repositories to the ops-tensor Blaze/Tensor API is error-prone: teams risk silently changing host tiling, ABI, workspace, support domains, or mathematical semantics while lacking a rigorous equivalence proof. This Skill enforces a serial, evidence-bound migration workflow that guarantees byte-identical functional results and comparable performance between the original and migrated kernels. ## Core Features & Use Cases - Serial Gate Workflow (G0-G6): Enforces sequential gates from environment preparation, contract freezing, Blaze development, validation asset generation, original baseline verification, Blaze acceptance, to final code delivery, with strict ownership and evidence rules. - Byte-Exact Equivalence Validation: Requires original and Blaze outputs, dynamic metadata, and inplace after-state to match byte-for-byte via a shared ACLNN runner; tolerance-based comparisons are diagnostic only. - CMCT/CGMCT Elimination and Anti-Pattern Scanning: Scans the active dependency closure and changed files to ensure zero CMCT/CGMCT hits and no low-level AscendC APIs leaking into Kernel, Block, or Scheduler orchestration layers. - Use Case: Migrate a GroupMatmul kernel on Ascend 950 (DAV_3510) to Blaze: the Skill freezes the migration contract in G1, develops the Blaze implementation in G2, builds both OPP packages in G3, establishes the original baseline in G4, and accepts the migration in G5 only after byte-exact and msprof performance comparisons pass. ## Quick Start Ask the assistant to use the ascendc-blaze-migration skill to migrate a specific AscendC kernel from ops-nn or ops-transformer to the Blaze Tensor API on Ascend 950, starting with gate G0 environment and repository preparation.

Frequently Asked Questions about ascendc-blaze-migration

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

FAQPage Schema
How do I migrate an AscendC kernel to the Blaze Tensor API?

Follow the serial gate workflow G0 through G6: prepare isolated repositories and environment state, freeze the migration contract and behavior design, develop the Blaze implementation, build both formal OPP packages, establish the original baseline, and run Blaze acceptance with byte-exact comparison before committing locally.

What is the acceptance criterion for Blaze kernel migration?

Acceptance requires original and Blaze outputs, dynamic metadata, and inplace after-state to match byte-for-byte across all frozen test cases, plus per-case msprof performance comparison within thresholds. Tolerance metrics like rtol or atol are diagnostic only and cannot produce a PASS.

Can I change host tiling or blockDim during Blaze migration?

No. Host tiling, TilingKey, ABI, workspace, blockDim, support domain, and mathematical semantics are frozen invariants from gate G1. The migration only restructures device-side implementation; changing these contracts requires returning to G1 or marking the task blocked.

Which platforms and kernel types does Blaze migration support?

The migration targets Ascend 950 / DAV_3510 platforms only. It covers CMCT, CGMCT, monolithic, and custom layered kernels including Cube, Vector, MIX, high-level Matmul, manual buffer management, data movement, custom scheduling, VF, and synchronization paths.

Why must CMCT and CGMCT dependencies be removed during migration?

DAV_3510 migrations require zero CMCT/CGMCT implementation hits in both the active dependency closure and changed implementation files. Wrappers, aliases, and compile switches are only allowed as evidenced exclusions; residual dependencies block gate G2 closure.

What happens if the environment lacks a visible NPU device?

Missing device capability does not block development gates like G1 contract design or G2 Blaze coding. Only device-dependent validation stages such as G4 baseline runs and G5 acceptance remain in unknown status until the capability becomes available.