Repository navigation
[OPUS] mma step_k, dword copy by set_slice and inline asm for tr_load - #2652
Merged
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends OPUS’s tiled MMA adaptor API with per-K-step accumulation entry points and optimizes set_slice_impl for sub-dword element types by performing aligned copies at dword granularity to reduce compiler-generated per-lane insert logic.
Changes:
- Added
tiled_mma_adaptor::step_koverloads to compute a single K-slice update for array- and vector-backed tiles (scaled and unscaled). - Updated
impl::set_slice_implto perform dword-granularity copies for sub-dword scalar types when slices are dword-aligned.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kaiyang-1
marked this pull request as draft
April 9, 2026 10:42
kaiyang-1
marked this pull request as ready for review
April 10, 2026 16:40
Liang-jianhao97
pushed a commit
that referenced
this pull request
Apr 30, 2026
…#2652) * tiled mma with step_k and improve set_slice * check unit stride for set_slice dword copy * compact set_slice_impl and tr_load by inline asm * fix tr_load for runtime layout * unit test for tiled_mma_adaptor::step_k * resolve ci code style check
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhancements to tiled MMA operations:
step_kmethod totiled_mma_adaptor, enabling stepwise computation over the K dimension for both arrays and vectors, with and without scaling factors. These overloads support more flexible and efficient tiled MMA operations, allowing partial computation and improved composability.Performance optimization for memory copy:
set_slice_implto optimize memory copying for sub-dword scalar types (such as bf16, fp16, fp8) when source and destination slices are dword-aligned and contiguous. This copies at dword granularity to avoid v_bfi_b32 generated by compiler from per-element insert.Shared memory transpose load refactor:
smem::_tr_loadto use inline assembly and support immediate offsets and generalized the implementation for different scalar types, improving code clarity and enabling more efficient loads with compile-time known offsets.