mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1522] STRATA_GDN_CONVL2=1 is not bitwise on CUDA 13.3 / sm_120: gdn_l2_kernel compiles without the fma the fused kernel spells out #611
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#611
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sergqwer on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1522
STRATA_GDN_CONVL2=1(9668e324, "bitwise"; on by default on gfx1151 through arch_defaults) changes the output on CUDA 13.3 / sm_120.Measured: v0.1.40.3 (
d5ea7133), RTX 5090, Windows / MSVC 17.14, CUDA 13.3. IQ2_XS, 2K prompt,--expert-cache 12000 --pcie-frac 0.25, 32 greedy tokens:STRATA_GDN_CONVL2=1First-token KL 0.138; the top token is the same.
Why:
gdn_conv_l2_kernelspells out the reduction "as the compiler built"gdn_l2_kernel. The first xor step is an fma of the own unrounded square with the partner's rounded one, and the rest are plain adds. On this toolchaingdn_l2_kernelhas no fma at all.cuobjdump -sass -arch sm_120of it:So
__fmaf_rn(v, v, partner)rounds the first step differently,ssdiffers in its last bits, and the recurrence carries that through the layers. Whether the two kernels match depends on how the compiler contractswarp_sum(v * v).Possible fixes:
gdn_l2_kernelas well, so both kernels are toolchain-independent. The default's bits would then move once, on toolchains that had contracted.warp_sum(v * v)expression in the fused kernel. This is likely the same code on most toolchains, but not guaranteed.I can send a PR for whichever you prefer.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.