Skip to main content

Ascend 910B3 FP16 GEMM and Attention Sanity Check (Historical Dev Archive)

Status: Informal dev sanity check archived from 0.3.1-ascend, not a sealed holdout. For the preregistered multi-shape sealed holdout evaluation and formal verdict (Pass on all 4 cohorts: GEMM warm/cold and Attention warm/cold, lifting unvalidated_target_ascend for ascend910b3), see ascend910b3-holdout.md.

Setup​

  • Hardware: Huawei Ascend 910B3 (npu:0, 20 AI Cores = 20 AIC + 40 AIV, 64 GiB HBM, 192 MiB L2, 1800 MHz Cube clock).
  • Software: Driver 26.1.1, CANN 9.2.1, Triton 3.5.0, Triton-Ascend 3.2.2, torch_npu 2.10.0.post4.
  • Profile: profiles/ascend910b3.json (0.3.1-ascend, M1 + M2 microbenchmarks including isolated FFTS+ cross-core sync handoff latency cv_sync_hop_ns_by_active_sms, zero GEMM or Attention fitting).
  • Measurement: Cold L2 (384 MiB flush before each timed kernel), 3 warmup runs + 10 timed runs via torch.npu.Event, median latency reported.
  • Simulation: l2_state = "cold", 64 Latin hypercube draws (seed = 17), 10 Triton-Ascend FP16 GEMM configs (7 multibuffer = True, 3 multibuffer = False) and 8 forward GQA Attention configs (validation/attention.py:fused_attention, Z=2, H=16, H_kv=4, S=2048, D=64, both causal = False and causal = True).

Summary Metrics​

WorkloadProfile / CoreSpearman rhoMedian rel errorPairwise verdict precisionTop-3 regret
GEMM 2048 x 2048 x 20480.3.0-ascend (pre CV-split)0.624-24.0%33/41 (80.5%)0.00%
GEMM 2048 x 2048 x 20480.3.1-ascend (CV-split + equal_to_1)0.891-23.6%37/42 (88.1%)0.00%
GEMM 4096 x 4096 x 40960.3.0-ascend (pre CV-split)0.709-21.0%32/40 (80.0%)0.00%
GEMM 4096 x 4096 x 40960.3.1-ascend (CV-split + equal_to_1)0.879-21.0%36/38 (94.7%)0.00%
Attention Z=2 H=16/4 S=2048 D=64 (causal=False)0.3.1-ascend (CV-split)0.929+40.0%23/23 (100.0%)0.00%
Attention Z=2 H=16/4 S=2048 D=64 (causal=True)0.3.1-ascend (CV-split)0.881+20.8%23/25 (92.0%)0.00%

In all four cases, the predicted top-3 shortlist achieves 0.00% regret against the fastest measured hardware config.

Per-Config Results (0.3.1-ascend)​

GEMM 2048 x 2048 x 2048​

ConfigHardware (us)Predicted (us)Rel errorDominant bound
m128n256k64_g8_mb1141.0115.2-18.3%dram_latency (0.47)
m128n256k64_g8_mb0148.8153.4+3.1%mma (0.81)
m128n128k64_g8_mb1189.8136.2-28.2%dram_latency (0.76)
m128n128k64_g8_mb0200.8192.9-3.9%dram_latency (0.78)
m128n128k32_g8_mb1299.1170.9-42.9%dram_latency (0.78)
m128n128k128_g8_mb1156.3121.1-22.5%dram_latency (0.75)
m64n128k64_g8_mb1258.0194.1-24.8%l2_latency (0.73)
m64n64k64_g8_mb1428.6301.8-29.6%dram_latency (0.89)
m64n64k32_g8_mb0787.8863.6+9.6%dram_latency (0.91)
m128n256k32_g1_mb1184.2132.3-28.2%l2_latency (0.80)

GEMM 4096 x 4096 x 4096​

ConfigHardware (us)Predicted (us)Rel errorDominant bound
m128n256k64_g8_mb1983.2801.0-18.5%mma (0.62)
m128n256k64_g8_mb01011.71089.0+7.6%mma (0.95)
m128n128k64_g8_mb11343.31028.7-23.4%dram_latency (0.88)
m128n128k64_g8_mb01415.51501.4+6.1%dram_latency (0.88)
m128n128k32_g8_mb12184.11307.7-40.1%dram_latency (0.88)
m128n128k128_g8_mb11100.1901.6-18.0%dram_latency (0.87)
m64n128k64_g8_mb11948.31451.3-25.5%l2_latency (0.86)
m64n64k64_g8_mb13221.22330.3-27.7%dram_latency (0.94)
m64n64k32_g8_mb06009.56908.4+15.0%dram_latency (0.95)
m128n256k32_g1_mb11231.4925.8-24.8%l2_latency (0.94)

Attention Z=2, H=16, H_kv=4, S=2048, D=64 (causal=False)​

ConfigHardware (us)Predicted (us)Rel errorDominant bound
bm64_bn64_mb15721.57758.4+35.6%issue (1.00)
bm64_bn64_mb05770.28365.5+45.0%issue (1.00)
bm64_bn32_mb111417.213865.8+21.4%issue (1.00)
bm64_bn128_mb12890.64708.3+62.9%issue (1.00)
bm32_bn64_mb111412.214107.0+23.6%issue (1.00)
bm32_bn32_mb122744.525845.0+13.6%issue (1.00)
bm128_bn64_mb12901.64533.8+56.2%issue (1.00)
bm32_bn128_mb15713.88247.5+44.3%issue (1.00)

Attention Z=2, H=16, H_kv=4, S=2048, D=64 (causal=True)​

ConfigHardware (us)Predicted (us)Rel errorDominant bound
bm64_bn64_mb13488.84168.0+19.5%issue (1.00)
bm64_bn64_mb02976.34522.2+51.9%issue (1.00)
bm64_bn32_mb16393.87805.8+22.1%issue (1.00)
bm64_bn128_mb12141.92655.0+24.0%issue (0.99)
bm32_bn64_mb17075.87543.5+6.6%issue (1.00)
bm32_bn32_mb112572.713393.2+6.5%issue (1.00)
bm128_bn64_mb11806.32921.4+61.7%issue (1.00)
bm32_bn128_mb14332.84416.1+1.9%issue (0.99)

Observed Residuals​

  1. GEMM multibuffer = False overestimate resolved: Specializing equal_to_1 strides in ascend_compiler.py matches Triton-Ascend's runtime AIC_ONLY lowering (eliminating spurious AIV GM workspace traffic), and genuine mix-mode workspaces stay L2-resident when fitting in l2_effective_capacity_bytes. multibuffer = False errors dropped from +64%..+127% to -3.9%..+15.0%.
  2. GEMM multibuffer = True optimistic bias (-18% to -43%): Cube MTE1 (L1 -> L0A/L0B) and Fixpipe (L0C -> GM NZ-to-ND) formatting/transfer pipelines are not yet modeled separately from UB copy bandwidth.
  3. Attention conservative latency bias (+2% to +63%): Isolated FFTS+ CrossCoreSetFlag/WaitFlag handoff latency (570 ns/hop at 20 active AI Cores x 6 hops/iter = 3421 ns/iter) accounts for the hardware per-iteration floor (3475-3543 ns/iter). The core currently adds AIV issue time and cross-core sync latency serially in Parts::compute(), causing a +20% to +56% conservative offset on larger tiles while preserving strong config ranking (Spearman rho 0.88-0.93, 92%-100% pairwise precision, 0.00% top-3 regret).