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