You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CUDA Oxide lowers floating-point fetch_add to LLVM atomicrmw fadd. Modern LLVM/NVVM accepts that form, but the legacy LLVM 7 NVVM dialect used for pre-Blackwell targets predates floating-point atomicrmw, so otherwise valid relaxed device-scoped DeviceAtomicF32 and DeviceAtomicF64 kernels fail during legacy legalization/export.
NVIDIA's NVVM IR specification provides dedicated atomic-add intrinsics for f32 and f64 pointers in generic, global, and shared address spaces.
Before: legacy legalization rejects `atomicrmw fadd` as unsupported
After: relaxed device-scoped f32/f64 add lowers to the matching NVVM intrinsic
Required semantics
The legacy intrinsic corresponds to CUDA's relaxed, device-scoped atomic add. Rewriting must therefore be limited to:
f32 or f64 values;
generic, global, or shared pointer address spaces (0, 1, or 3);
monotonic LLVM ordering;
syncscope("device").
Block/system scope, stronger direct orderings, unsupported widths/address spaces, and other floating RMW kinds must remain explicit errors rather than being weakened. Validation must finish before mutation so a bad operation cannot leave a partially legalized module.
Acceptance criteria
All six documented f32/f64 × p0/p1/p3 overloads lower to exact NVVM intrinsic signatures.
Unsupported semantics fail before any module mutation.
Existing integer-RMW behavior remains unchanged.
Legacy LLVM IR contains no atomicrmw fadd after legalization.
Optimized and no-opt legacy builds execute correctly on a supported GPU.
Activity
fix(mir-lower): route SeqCst fences through the NVVM membar intrinsic
fix(mir-lower): lower scoped atomic load/store and fences to inline P…