NVIDIA cuda-tile bug: LoopSplit arithmetic wraps at -O3, silently miscompiling GPU loops
vxnuaj · x · 2026-11-19
A developer filed issue #28 against NVIDIA/cuda-tile: cuda-tile-optimize at default -O3 miscompiles cudatile.for loops when the LoopSplit pass computes a split point whose arithmetic wraps, affecting v13.5.0 (25732e3) and current main.
- Root cause: split-point arithmetic is emitted as plain addi/subi/divi/muli without overflow flags, so it wraps; the split loops can take the wrong branch (and wrong induction values in the unsigned case).
- Triggers: (1) > or <= with c equal to the type maximum, where c+1 wraps to the minimum; (2) unsigned loops with a non-power-of-two step and c < lb, where sp - lb wraps and the ceil division misaligns.
- Impact: silently wrong results on GPU even though the source programs have no undefined behavior.
A notable compiler bug for anyone relying on the new CUDA Tile toolchain.
More from coding & agent
- Hot take: low-level programming is easier than your containerized dependency mess — shauseth · 2026-11-19
- Remotion ships real motion blur via HTML-in-canvas and WebGPU — Vjeux · 2026-11-19
- Immunologist builds research-grade flow cytometry app with GPT-6.2, plans to open-source it — DeryaTR_ · 2026-11-19
- Switch Buddy builds a full dev team from one prompt: coder, reviewer, debugger in shared rooms — cneuralnetwork · 2026-11-19
- Unverified: Google's rumored Gemini Neon wows with one-shot working Olivetti typewriter — dreamwieber · 2026-11-19
- Zed dev: Gemini 4 Neon solves in one round what 3 frontier models couldn't crack in 9 — vivnat · 2026-11-19