Skip to content

Phase 2 follow-ups: the autotuner, jax#41888 on sm_120, and float64 emulation - #21

Merged
mmcky merged 1 commit into
mainfrom
phase2-followups
Nov 1, 2026
Merged

mmcky merged 1 commit into
mainfrom
phase2-followups

Conversation

@mmcky

@mmcky mmcky commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Two short rented sessions on 2026-11-01, recorded in precision/runs/2026-11-01/README.md: a Lambda A10 for 11 minutes and an EC2 g7e.2xlarge for 51, about USD 3.10 in all. Both machines are terminated, and the AWS key pair and security group made for the session are deleted.

Question Answer
Does XLA's autotuner make compiling the stored step need twice its array? (#1, Phase 2) Yes. On the A10, with --xla_gpu_autotune_level=0, 40k in float64 and 60k in float32 compile in 0.05 s and run, where they had run out of memory allocating a second copy. Every cell that ran both ways keeps its warm speed
Is the autotuner what makes float64 compile slowly on the newer cards? Yes. On the Blackwell card the recomputing step compiles in 0.11 s instead of 19 s, at the same warm speed. A float64 matrix product at n = 16,384 makes its first call in 5.5 s instead of 509 s, at the same 1.71 TFLOPS
Does jax-ml/jax#41888 reach sm_120? As on the H100: the first case fails only under 0.11.2 with jax[cuda13], and the second passes everywhere. Under 0.12.0.1 both builds pass
Does JAX's float64 matrix product reach cuBLAS's float64 emulation? (QuantEcon/project-econ-on-ai-hardware#4, question 1) No. XLA uses its own Triton kernel, or with Triton's GEMMs off it calls cublasLtMatmul, where CUBLAS_EMULATE_DOUBLE_PRECISION=1 changes only which native algorithm runs. Through cublasGemmEx (CuPy), the same variable gives 31.7 TFLOPS against 1.51 native at n = 16,384, with errors 40 to 60 times smaller. It falls back to native when the inputs' logarithms spread too widely (lognormal σ = 5)

Files:

Item Path
A10 rows, labelled cuda12 and cuda12-autotune0 results/lambda-gpu_1x_a10/2026-11-01.jsonl
Blackwell recomputing-step rows, with no label and labelled autotune0 results/aws-g7e.2xlarge/2026-11-01.jsonl
The scripts, the scatter output, the 124 matrix-product rows, the compiled HLO, and cuBLAS's logs precision/runs/2026-11-01/

The cuda12 rows and the Blackwell rows with no label replace Phase 2's rows at the same cells on the dashboard. Their warm times agree with Phase 2's to within 4%, their compile times to within 3%, and they fail at the same cells. QuantEcon/project-benchmarks-jax names the two new labels on the dashboard.

🤖 Generated with Claude Code

…mulation

Two rented sessions on 2026-11-01. On a Lambda A10, the stored step with XLA's autotuner off compiles at 40k in float64 and 60k in float32, where it had run out of memory. On an RTX PRO 6000 Blackwell (EC2 g7e.2xlarge): jax-ml/jax#41888's reproducer fails only under 0.11.2 with the CUDA 13 wheels, as on the H100; the autotuner is what makes float64 compile slowly on the newer cards; and cuBLAS emulates float64 matrix products about 20x faster than native when called through cublasGemmEx, while JAX's float64 dot never reaches it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 07:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review surfaced no objective code defects or outstanding issues across the added benchmark rows, scripts, and documentation, leaving nothing unresolved to block approval.

No open issues 🎉

What changed in this PR

Records two short rented GPU sessions (A10 and an RTX PRO 6000 Blackwell) that answer four Phase‑2 follow‑up questions for #1: whether XLA's autotuner forces a second buffer when compiling the stored Bellman step, whether the autotuner explains slow float64 compiles on newer cards, whether jax-ml/jax#41888's float64 scatter bug reaches sm_120, and whether JAX's float64 matmul reaches cuBLAS's float64 emulation. It fits the repo's existing precision/runs/<date>/ + top-level results/<host>/<date>.jsonl convention, adding 8 new Blackwell benchmark rows plus the scripts, logs, and analysis that produced them.

Changes:

  • New Blackwell benchmark rows (bellman_recompute, autotuner on/off) in results/aws-g7e.2xlarge/2026-11-01.jsonl, matching the established result schema.
  • Two reusable probes — dot64.py (float64 GEMM speed/accuracy across JAX and CuPy, with cuBLAS emulation toggles) and scatter_41888.py (unchanged upstream reproducer) — plus the session shell scripts.
  • A README.md write-up with tables tying each conclusion to the committed JSONL, logs, HLO dumps, and cuBLAS traces.
File Description
results/​aws-g7e.2xlarge/​2026-11-01.jsonl 8 Blackwell bellman_recompute rows (autotuner on/off); schema matches prior rows
precision/​runs/​2026-11-01/​README.md Session write-up; tables verified against data and logs; links resolve
precision/​runs/​2026-11-01/​dot64.py float64 GEMM speed/accuracy probe (JAX/CuPy, emulation toggles)
precision/​runs/​2026-11-01/​scatter_41888.py Unchanged jax#41888 scatter reproducer
precision/​runs/​2026-11-01/​a10_autotune.sh A10 stored-step autotuner run driver
precision/​runs/​2026-11-01/​blackwell*.sh Blackwell session drivers (scatter, dot64, cuBLAS logging)
precision/​runs/​2026-11-01/​{aws-g7e.2xlarge,lambda-gpu_1x_a10}/​* Captured logs, HLO dumps, cuBLAS traces, environment/machine info

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants