Skip to content

Fix SFB shared memory layout major selection - #3566

Open
migarci2 wants to merge 2 commits into
NVIDIA:mainfrom
migarci2:fix/sfb-shared-memory-layout
Open

migarci2 wants to merge 2 commits into
NVIDIA:mainfrom
migarci2:fix/sfb-shared-memory-layout

Conversation

@migarci2

@migarci2 migarci2 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

smem_atom_layoutSFB currently selects its strides from majorSFA, so both mixed-major configurations get the opposite SFB ordering. This changes the predicate to majorSFB.

The host regression covers all four (majorSFA, majorSFB) combinations and compares the SFB shared-memory atom directly with tile_atom_to_shape_SFB. That gives a compile/pass check for (K, MN) and catches the otherwise masked (MN, K) mismatch at compile time.

Testing:

  • compiled and ran CuTe_core.BlockwiseScaleLayoutSFBUsesOwnMajor with GCC 10.2.1
  • confirmed the same test fails to compile on current main at exactly the two mixed-major assertions
  • confirmed all four combinations compile with this change

Fixes #3535

@migarci2

Copy link
Copy Markdown
Contributor Author

Friendly bump — ready for another look when you have a moment. Happy to address any feedback.

(Also have a few related small fixes open if useful: #3569, #3570, #3571, #3577.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

smem_atom_layoutSFB branches on majorSFA instead of majorSFB

1 participant