EXHIBIT 05 / ACCELERATOR PORTING

Why can’t the same model move straight to a different accelerator?

A model definition may stay recognisable while the software stack underneath it changes. Porting means aligning versions, supplying operator implementations, converting representations, and checking numerical behaviour before performance tuning begins.

THE SHORT ANSWERRun. Match. Validate. Then optimise.

7–12 MIN · STEP-BY-STEP · NO ACCOUNT
ROOM 01

Three lines of application code can hide four engineering gates.

  1. 01 / VERSIONSAlign the stack

    Driver, firmware, runtime, framework adapter, and Python packages must describe a supported combination.

  2. 02 / OPERATORSCover the graph

    Every operation the model uses needs a correct implementation; an available but slow fallback is a separate problem.

  3. 03 / FORMATSTranslate representations

    Weights and activations may need supported numerical formats. Changing representation changes storage and error behaviour.

  4. 04 / VALIDATIONCompare several signals

    Running without an exception is not the same as matching a reference, and matching is not the same as being fast.

IMPORTANT BOUNDARY

The porting sequence is based on public Ascend practice records. The terminal messages, version numbers, and operator counts in the teaching trace are illustrative; this museum did not benchmark two accelerators.

ROOM 02

Move through the gates in the order failures usually surface.

Use the step controls to separate compatibility, correctness, and performance. They are different release decisions.

EDITORIAL TEACHING RECORDNOT A LIVE MODEL TRACE

GATE 01

Compatibility before diagnosis

A low-level runtime error can be the visible symptom of a mismatched driver, toolkit, or framework adapter.

RECORD

Check an official compatibility matrix before changing model code.

Step 1 / 4

Keyboard: focus this record and use ← or →. Nothing advances automatically.

ROOM 03

One recorded run, three failure shapes.

Choose a case from the real one-machine Python simulation. It compares code paths, not physical accelerators.

RECORDED-RUN EXPLORERNO MODEL OR EXTERNAL SERVICE

Only matrix-multiply inputs are rounded to BF16 representation; multiplication and accumulation still use Python double precision.

Layer 1 cosine
0.999997
Layer 1 max abs error
7.264e-03
Layer 1 relative RMSE
2.362e-03

No single metric or universal threshold validates every operator. Maximum absolute error changes with scale; relative metrics and task-specific tolerances answer different questions.

ROOM 04

The executable evidence isolates a blind spot in cosine similarity.

SIMULATED NETWORK8 layers × 64 dimensions

Four input rows, fixed seed 0, one machine, Python floating-point reference.

WRONG OPERATOR · COSINE8 / 8 pass

Illustrative threshold 0.999; layer 1 displays 1.000000 at six decimals.

WRONG OPERATOR · MAX ERROR1.539e-02

Layer 1 maximum absolute error on the same values; it reveals a difference hidden by the displayed cosine.

EXECUTED

One-machine code comparison

The Python script runs a reference path and three deliberately altered paths with fixed inputs.

MEASURED

Four error views

It reports cosine similarity, one minus cosine, maximum absolute error, RMSE, and relative RMSE by layer.

NOT CLAIMED

A hardware benchmark

No accelerator was measured. The first porting gates are teaching examples; only the alignment simulation was executed.

RECORDED RUN / EXECUTED

Inspect the result behind the interpretation.

In the recorded wrong-variance case, all eight layers passed cosine ≥ 0.999, while layer 1 maximum absolute error was 1.539e-02. The metrics exposed different properties of the same values.

Tracked content revision: d3c2df1da471433f3ff98b8b9c0c41b376b91993399e5aa50d0d7aac4227fc8c

Show exact lines from the original stdout

The program’s original labels are in Simplified Chinese; the lines and numbers below are copied without translation.

【情况二 · 算子写错了:方差除以 n-1 而不是 n】
   1     1.000000   4.441e-16      1.539e-02     7.843e-03        7.843e-03      通过
  余弦判定(门槛 0.999):8/8 层通过
三张表放在一起看:余弦判定在 3/3 种情况里都是「全部通过」,
Download the exact Python script

PRIMARY & PRACTICE SOURCES

Inspect the museum’s source record.

vLLM Ascend 发布说明(官方文档)vLLM 项目官方文档 · checked secondhand on 2026-09-07 Ascend/pytorch(torch_npu)代码仓库Gitee · Ascend · checked unrecorded vLLM-Ascend 实战指南:从环境部署到性能调优的完整避坑手册CSDN · checked unrecorded 华为昇腾 910B×8 部署 DeepSeek 实战记录博客园 · checked unrecorded 华为昇腾910B国产化适配深度解析:从CANN算子到vLLM实践知乎 · checked unrecorded