iris
iris copied to clipboard
Fix hardcoded lock value in fused GEMM+CCL operations
Summary
- Replace hardcoded lock signal value
1in fused GEMM+CCL producer-consumer signaling with a monotonically increasingcall_counteronFusedWorkspace - Each call to
matmul_all_reduceormatmul_reduce_scatterincrements the counter and passes it to both producer (atomic_xchg) and consumer (spin loop) sides - Eliminates the need to zero locks between calls for
one_shot,two_shot, andreduce_scattervariants spinlockvariant is unaffected (uses CAS mutex pattern that self-resets)signal_valueparameter defaults to1for backward compatibility with existing test kernels
Test plan
- [x] 25/25 fused ops tests pass on MI300X (8 GPUs)
- [x] 54/54 context CCL tests pass on MI300X (8 GPUs)
- [x] Custom workspace reuse test: 5 consecutive calls without lock zeroing, all correct (max_diff=0.125, call_counter=1→5)
Closes #465
🤖 Generated with Claude Code