Repository navigation
A100 fp32 deviation explained: the host CPU builds a different graph - #3
Merged
Merged
Conversation
The A100-SXM4-40GB "TF32-level" deviation in the canaries (1.32e-2 max rel RMS vs the RTX 5090) is not GPU precision. The official code builds the grid<->mesh graphs with NumPy on the host CPU from float32 lat/lon, and NumPy's math code path (picked from the CPU) changes last bits and with them 13 of 1.6M grid->mesh edges and 517 mesh->grid triangles. Modal's A100-40GB hosts are AVX2-only; the RTX 5090 desktop and Modal's A100-80GB and T4 hosts are AVX-512. The earlier "autotune pick" reading was wrong: Modal had served every matching "A100-40GB" repeat on 80GB machines. Evidence (docs/results/a100_host_graph/): pre-optimisation HLO differs only in the edge-feature constant; XLA/TF32 knobs change nothing; the error sits on the changed edges; graph swaps in both directions; and on one A100-80GB, forcing NumPy's AVX2 path reproduces the 40GB graph (same hash), moves the output by exactly 1.32e-2 and matches the A100-40GB at 1.7e-5. - canary_run.py records graph hashes and NumPy SIMD targets, --edges runs on another machine's graph, --steps 0 skips the rollout - scripts/graph_edges.py: count/hash/save the host-built graphs (CPU only) - cloud/modal_a100_tf32.py, cloud/modal_graph_hosts.py: the probes - validation.md §4 A100 note, table, Limitations; AGENTS.md gotcha Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--no-autotune was recommended for strict fp32 because of the A100 deviation, which turned out to be a host-built graph difference (autotune off changed nothing there; docs/validation.md §4). The FAQ now says --precision highest is what gives fp32-level results, and that machines with and without AVX-512 build slightly different grid<->mesh graphs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explains the A100 fp32 deviation reported in 0.1.0 and 0.2.0 (1.3e-2 max rel RMS vs the RTX 5090 at
highest), and removes advice that assumed it was GPU precision.Cause
Not GPU numerics. The official code builds its grid↔mesh graphs with NumPy on the host CPU from float32 lat/lon, and NumPy's SIMD code path depends on the host. Modal's A100-40GB hosts are AVX2-only; the RTX 5090 desktop and Modal's A100-80GB and T4 hosts have AVX-512. The two build graphs that differ in 13 of 1.6M grid→mesh edges and 517 mesh→grid triangles, which is enough for 1.3e-2 in the most sensitive field (median 6e-4). It happens with or without faster-weathernext.
Evidence (docs/validation.md §4, A100 note;
docs/results/a100_host_graph/), one 0.25° step athighest:NVIDIA_TF32_OVERRIDE=0and Triton GEMMs off all give the same 1.32e-2.Changes
cloud/canary_run.py: records graph hashes and NumPy's SIMD targets,--edgesruns on another machine's graph,--steps 0skips the rollout.scripts/graph_edges.py(counts and saves the graphs on the CPU),cloud/modal_a100_tf32.py,cloud/modal_graph_hosts.py(the probes).--no-autotunehelp, AGENTS.md: drop the "use--no-autotunefor strict fp32 on A100" advice; the FAQ says why results can differ between machines.No change to
patch.pyorpallas_attn.py. CPU tests: 32 passed, 10 skipped.🤖 Generated with Claude Code