interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / tests / amd-exec / fp8block_fast_notebook / README.md

64 lines · 3808 bytes Raw Blame History Rendered
1# MI300X comparison cell v13
2
3Paste the complete generated `cell-v13.py` into the MI300X notebook. It embeds
4seeded Omega objects and needs no checkpoint download. Hardware correctness and
5performance are **NOT_RUN** until the relay executes it. CPU self-check timings
6are explicitly `SIMULATED_NOT_MEASURED`; they are never GPU measurements.
7
8The cell compares `fp8gemv_b128f`, the unchanged `fp8gemv_b128` baseline, and
9stock AMD `torch.matmul` BF16. Real shapes are derived from the checkpoint
10acceptance report, not maintained as a second list. For each shape, all three
11paths use the same deterministic OCP E4M3 W, BF16 scale grid and BF16-representable
12F32 input vector. Every output row is checked, including planted NaN rows. The
13log prints `same_data_sha256` for cross-path matching. Correctness and timing
14lines identify the actual Omega kernel. BF16's pre-dequantized weight matrix
15and output are BF16, so its separate v11 BF16 tolerance remains unchanged.
16
17Three rebuilt wrong-kernel controls run first: per-row scales, transposed scales,
18and dropped final partial scale block. A missing, crashed or escaped control
19cannot produce an overall PASS. Each group runs in a separate subprocess with
20its exact object name/hash marker; a fault is reported without hiding later
21groups. The control summary precedes correctness output. Output is saved to
22`amdserve-probe-v13.txt`, with `.state`, `.mark` and per-group stderr companions.
23
24Warm and cold tests retain v11's synchronized per-call wall-clock method. Cold
25calls rotate distinct W/y allocations beyond the stated cache working set;
26x/scales are shared. Torch uses its own BF16 matrix copies beyond that same
27threshold. Allocation and dequantization are outside timing. The bandwidth
28numerator is W bytes (BF16 has twice the weight bytes), not total device traffic.
29This is GEMV comparison evidence, not complete-model serving latency. Shape,
30copies, rotation bytes and call counts are printed with every measurement.
31
32The fast kernel deliberately changes reduction order. Both Omega variants use
33v11's identical tolerance and NaN policy; no epsilon or bound was loosened.
34Kernel numerical-order details live in `tests/amd-exec/fp8block_fast.md` in the
35pinned source repository. `list.json`/`list.md` contain derived ABI, object hashes,
36heads, sampled CPU rows and bounds; the unchanged baseline's provenance is in
37`baseline/`. `build.json`, `selfcheck.json`, `cell-commands.json` and
38`SHA256SUMS` are generated records, not hand-maintained claims.
39
40## Building and checking the bundle
41
42`fp8block_fast_bundle.py` copies these committed packaging sources alongside the
43accepted objects. From that new bundle directory, under an externally held free
44queen pool lock and nice 10:
45
46```sh
47python3 build.py
48python3 selfcheck.py --out NEW_SELFCHECK_DIRECTORY
49python3 finalize.py --pool-lock ACTUAL_HELD_POOL_LOCK --log BUILD_LOG --log SELFCHECK_LOG
50```
51
52Capture the first two commands' combined stdout/stderr in the named logs. The
53self-check runs the full cell with simulated HIP/torch implementations and the
54full shape list. It verifies object digests/entry selection, ABI parameters,
55all-row checks, data identity, both Omega timing paths and rotation bookkeeping.
56It also plants a child SIGSEGV, an escaped mutant and a wrong last finite output;
57each must report `FAIL_OR_INCOMPLETE`. The simulator does not execute instructions,
58model memory latency or qualify the card. Real instruction behavior is covered
59separately by the seeded host executor acceptance and ultimately the relay.
60
61Python/numpy and LLVM are outside measuring/oracle instruments. They do not
62produce the production kernel object. A final overall PASS from the relay is
63required before interpreting its recorded device timings; failed or missing
64groups are not performance wins.