Repository navigation
docs(examples): vectorization misdescribes what f32x4_view_copy emits - #669
Conversation
The failure message says the kernel "has no 128-bit ld.global vector op", which reads as though the transaction had been split into scalars. SASS on sm_86 says otherwise: f32x4 LDG.E.128 x1, STG.E.128 x1 (2 ops) f32x4_view_copy LD.E.128 x1, ST.E.128 x1, LDL.64 x2, STL.64 x2 (6 ops) The 128-bit access is there. What is missing is the *global* window: the view path addresses through the generic one and pays four local-memory accesses, plus a chain of PRMT byte permutes, on the way. Message and comment corrected to say that. The check itself is unchanged and still fails, because the pessimization it detects is real -- only its description was wrong. Refs NVIDIA#657 Signed-off-by: Vyncint Ng <[email protected]>
The comment described the generic-window fallback in the present tense, which was accurate while NVIDIA#657 was open. NVIDIA#675 fixes it at the root, so on a tree with that change the check passes and this branch is never taken. Left as-is the comment would assert, in-tree, a pessimization that no longer happens. Reword to describe what a *future* failure most likely means rather than what the compiler currently does, so it stays true whichever order this and NVIDIA#675 land in. The printed message is unchanged: naming the address space rather than the width is still the right thing to say when the check fires. Refs NVIDIA#657, NVIDIA#675 Signed-off-by: Vyncint Ng <[email protected]>
|
Pushed This PR reworded the failure message for a check that #675 makes pass — it fixes the generic-window fallback at the root, in the enum filler lowering. So on a tree with #675 the The comment is now framed as what a future failure most likely means rather than what the compiler currently does, so it reads correctly whichever order the two land in. The printed message is unchanged — naming the address space rather than the width is still the right thing to say when the check fires. If you would rather this PR just went away now that the root cause is fixed, that is fine too: the message only matters on a regression. I have kept it because a regression here is easy to misread as scalarization, which is exactly the trap #657 set for me. |
|
makes sense on the wording — the SASS evidence in #657 shows the 128-bit access exists but sits in the generic window, and the old message sent readers hunting for a scalarization that never happened. With #675 merged the check passes and neither message prints, but the corrected failure text is what we want on record if this ever regresses. |
Split out of #657 as the part that needs no decision from you.
The failure message reads as though the transaction had been scalarized:
SASS on sm_86 says otherwise:
f32x4(direct)f32x4_view_copyLDG.E.128x1,STG.E.128x1LD.E.128x1,ST.E.128x1LDL.64x2,STL.64x2The 128-bit access is there. What is missing is the global window: the view path addresses through the generic one and pays four local-memory accesses, plus 37
PRMTbyte-permutes, on the way.What this changes
The message and its comment only. The check is untouched and still fails — the pessimization it detects is real, and this PR does not paper over it. #657 remains open for the codegen question.
I am sending it separately because it is correct either way: if the codegen is fixed the message never prints, and if it is not, anyone who hits it currently gets pointed at the wrong thing. I spent a while chasing a scalarization that was never happening because I believed this string.
cargo fmt --checkclean; no behaviour change.