Skip to content

[ROCM][DT] Update ukernel data layout - #22350

Merged
Yu-Zhewen merged 2 commits into
iree-org:mainfrom
Yu-Zhewen:update_ukernel
Oct 20, 2025
Merged

Yu-Zhewen merged 2 commits into
iree-org:mainfrom
Yu-Zhewen:update_ukernel

Conversation

@Yu-Zhewen

@Yu-Zhewen Yu-Zhewen commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor

#22284 changes the data tiling layout by removing moveCrossThreadOutermost. This PR updates ukernel accordingly to ensure correct matching.

Numerical correctness and performance have been verified locally on llama 8b prefill.

Closes: #22349

Signed-off-by: Yu-Zhewen <[email protected]>
@Yu-Zhewen
Yu-Zhewen requested a review from kuhar as a code owner October 20, 2025 13:48
@Yu-Zhewen
Yu-Zhewen requested review from bjacob and jtuyls October 20, 2025 13:48

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why we are changing this (in the PR description)?

@bjacob

bjacob commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

The linked Issue says it - this is fallout from #22284. Sorry that I somehow missed that. Does that mean that this ukernel was not covered by any e2e test?

@bjacob bjacob left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but can you add a e2e test that covers that? Should be a simple entry in tests/e2e/matmul/CMakeLists.txt. I'm available to help if needed.

@kuhar

kuhar commented Oct 20, 2025

Copy link
Copy Markdown
Member

The linked Issue says it

My point is that the PR description should provide a summary instead of introducing 2 layers of indirection

@Yu-Zhewen

Copy link
Copy Markdown
Contributor Author

The linked Issue says it

My point is that the PR description should provide a summary instead of introducing 2 layers of indirection

Thanks, done.

@Yu-Zhewen

Yu-Zhewen commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor Author

LGTM, but can you add a e2e test that covers that? Should be a simple entry in tests/e2e/matmul/CMakeLists.txt. I'm available to help if needed.

We already have e2e tests for these ukernels,

e2e_matmul_${_CDNA_ARCH}_dt_${_F8E4M3_TYPE}_tensor_ukernel_medium
,
e2e_matmul_${_CDNA_ARCH}_dt_${_F8E4M3_TYPE}_tensor_ukernel_large
,
e2e_matmul_${_CDNA_ARCH}_dt_tensor_ukernel_f16f16f32_large

The issue though, is we don't know if ukernels are actually matched/used or not, unless we check performance?

@bjacob

bjacob commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

So maybe these e2e tests are meant to cover these ukernels but actually don't? Otherwise, how could the regression creep in?

@bjacob

bjacob commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

The issue though, is we don't know if ukernels are actually matched/used or not, unless we check performance?

Sounds like a problem indeed. If you can confirm that that was the issue, we could try to conceive a way to guarantee ukernel selection. Could be a test-only flag to require ukernel matching.

Signed-off-by: Yu-Zhewen <[email protected]>
@Yu-Zhewen

Copy link
Copy Markdown
Contributor Author

The issue though, is we don't know if ukernels are actually matched/used or not, unless we check performance?

Sounds like a problem indeed. If you can confirm that that was the issue, we could try to conceive a way to guarantee ukernel selection. Could be a test-only flag to require ukernel matching.

Add a test-only flag sounds good. I will implement it in a separate PR.

@Yu-Zhewen
Yu-Zhewen merged commit fcae3fc into iree-org:main Oct 20, 2025
weidel-p pushed a commit to weidel-p/iree that referenced this pull request Oct 21, 2025
iree-org#22284 changes the data tiling layout by removing
`moveCrossThreadOutermost`. This PR updates ukernel accordingly to
ensure correct matching.

Numerical correctness and performance have been verified locally on
llama 8b prefill.

Closes: iree-org#22349

---------

Signed-off-by: Yu-Zhewen <[email protected]>
Signed-off-by: Philipp <[email protected]>
Muzammiluddin-Syed-ECE pushed a commit that referenced this pull request Oct 21, 2025
#22284 changes the data tiling layout by removing
`moveCrossThreadOutermost`. This PR updates ukernel accordingly to
ensure correct matching.

Numerical correctness and performance have been verified locally on
llama 8b prefill.

Closes: #22349

---------

Signed-off-by: Yu-Zhewen <[email protected]>
Muzammiluddin-Syed-ECE pushed a commit that referenced this pull request Oct 21, 2025
#22284 changes the data tiling layout by removing
`moveCrossThreadOutermost`. This PR updates ukernel accordingly to
ensure correct matching.

Numerical correctness and performance have been verified locally on
llama 8b prefill.

Closes: #22349

---------

Signed-off-by: Yu-Zhewen <[email protected]>
pstarkcdpr pushed a commit to pstarkcdpr/iree that referenced this pull request Nov 28, 2025
iree-org#22284 changes the data tiling layout by removing
`moveCrossThreadOutermost`. This PR updates ukernel accordingly to
ensure correct matching.

Numerical correctness and performance have been verified locally on
llama 8b prefill.

Closes: iree-org#22349

---------

Signed-off-by: Yu-Zhewen <[email protected]>
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.

[ROCM][DT] Update ukernel after removing moveCrossThreadOutermost

3 participants