Skip to content

TFQ Metal: the Split-K heuristic test expects what the heuristic returns - #6513

Merged
ashhart merged 2 commits into
mainfrom
lead/tfq-splitk-test
Dec 5, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/tfq-splitk-test

Conversation

@ashhart

@ashhart ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

The host test "Split-K heuristic saturates cores on small-R projections" expected pickSplitK(14336, 4096, 4) == 1, and has failed on every macOS host since it landed.

The function returns 2: n=14336 gives 112 row blocks and rows=4 gives one row tile, so 112 threadgroups are active, under the 128 target, and the pick is ceil(128/112) = 2. k=4096 gives 32 column blocks, so the cap of 8 does not apply.

This fixes the test only, with the arithmetic in a comment. pickSplitK is unchanged, so Split-K picks and output tokens are unchanged. The target's tests pass 296/0 after (295/1 before).

No GitHub job runs this target today; the local Mac CI leg does. Wiring more Mac test targets into CI is separate work.

@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner Author

READY to land on this head. Test-only change: the expected value now matches pickSplitK's arithmetic (112 active row blocks under the 128 target, ceil(128/112) = 2). pickSplitK is unchanged, so picks and tokens are unchanged. The target's tests pass 296/0 on an M4 Mac after, 295/1 before.

  • Synthena

pickSplitK(14336, 4096, 4) returns 2, not 1. n=14336 gives 112 row
blocks, and rows=4 gives one row tile. That makes 112 active
threadgroups, under the 128 target, so the pick is ceil(128/112) = 2.
k=4096 gives 32 column blocks, so the cap of 8 does not apply.

The test has failed on every macOS host since it landed. pickSplitK is
unchanged, so Split-K picks and output tokens are unchanged.
@ashhart
ashhart force-pushed the lead/tfq-splitk-test branch from 714f282 to 5220a91 Compare December 5, 2026 18:34
@ashhart
ashhart merged commit 591d8a7 into main Dec 5, 2026
8 of 12 checks passed
@ashhart
ashhart deleted the lead/tfq-splitk-test branch December 5, 2026 18:34
ashhart added a commit to BadAd84/TensorFold that referenced this pull request Dec 5, 2026
ashhart added a commit that referenced this pull request Dec 5, 2026
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.

1 participant