summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorjdj <jdj@kunix.org>2026-10-29 11:50:22 -0700
committerjdj <jdj@kunix.org>2026-10-29 11:50:22 -0700
commita0ddfb1b2f6242fac72f98e8d6ee1888e79667f3 (patch)
treea6e19658bae8466cb177d2ade41ad9176d23c2f8 /README.md
parent2a02fecc86a87a6f1639b80da932b1f9daed8f17 (diff)
downloadvolta-train-kernels-a0ddfb1b2f6242fac72f98e8d6ee1888e79667f3.tar.gz
volta-train-kernels-a0ddfb1b2f6242fac72f98e8d6ee1888e79667f3.zip
Validate offsets and canon_rope_attention shapes; default test device cuda:0 with safe skip; narrow README claimsHEADmaster
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/README.md b/README.md
index 1fc3451..89daa8a 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,8 @@ described in the paper *Outrageously Fast Training on Volta*.
|---|---|
| `attn.cu` via `varlen_causal_attention` | Causal attention over packed variable-length documents, head_dim 64, fp16 in/out. Forward and backward run on raw `mma.sync.aligned.m8n8k4` tensor-core instructions (HMMA.884) with fp32 accumulation. Documents are launched longest-first. |
| `canon_rope_bw.py` via `canon_rope_attention` | A Canon depthwise 3-tap convolution, RoPE and the attention above, as one autograd function. The Canon/RoPE part is a bandwidth-bound CUDA kernel. |
-| `canon_rope.py` | The Triton reference for Canon+RoPE. The CUDA version is bitwise-identical to it. |
-| `head.py` via `fused_lm_loss` | Chunked cross-entropy LM head that never materializes `(N, V)` logits. dW and dx come from fp32-output GEMMs. |
+| `canon_rope.py` | The Triton reference for Canon+RoPE. The CUDA forward is bitwise-identical to it; the CUDA backward reduces the weight gradient in a different order. |
+| `head.py` via `fused_lm_loss` | Chunked cross-entropy LM head that never materializes `(N, V)` logits. dW and dx come from fp32-output GEMMs. It saves memory; it is not faster than an unchunked head that fits in memory. |
| `integ_ops.py` | Fused residual-add + RMSNorm backward, weight-gradient accumulation straight into fp32 `.grad`, and a tied-embedding gradient. |
## Requirements
@@ -46,15 +46,18 @@ o.sum().backward()
## Precision
Every kernel keeps the operand dtypes and fp32 accumulation of the stock path it
-replaces. The test suite holds each output's error against an fp64 reference
-to at most 1.05x the stock path's own error on the same inputs. Document
-isolation is exact. dQ uses fp32 atomics, so the attention backward is not
+replaces. For attention (forward and backward), the test suite holds each output's
+error against an fp64 reference to at most 1.05x the stock path's own error on the
+same inputs, and checks that document isolation is exact. The Canon+RoPE forward is
+tested bitwise against its Triton reference. The Canon backward and the ops in
+`integ_ops.py` were validated inside the Boris-2 training code but have no
+standalone tests here yet. dQ uses fp32 atomics, so the attention backward is not
bitwise deterministic run to run (the difference is fp32 summation order only).
## Tests
```bash
-VK_TEST_DEVICE=cuda:0 python -m unittest discover -s tests -v # run from the repo root
+python -m unittest discover -s tests -v # from the repo root; VK_TEST_DEVICE=cuda:N picks the GPU
```
## Results