feat(vpto): add L1 fill intrinsic support - #1234
Draft
erhsh wants to merge 1 commit into
Draft
Conversation
erhsh
force-pushed
the
cj/main_feat_pto_l1_fill
branch
from
August 12, 2026 09:24
1358419 to
06372ab
Compare
erhsh
force-pushed
the
cj/main_feat_pto_l1_fill
branch
from
August 13, 2026 08:54
06372ab to
c629920
Compare
erhsh
marked this pull request as draft
August 13, 2026 11:43
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.
Motivation
This PR adds a low-level PTO/VPTO operation for filling an L1 (MAT/CBUF) region with a repeated 16-bit or 32-bit value. The intent is to expose the hardware
create_cbuf_matrixcapability directly so that callers can initialize L1 without first materializing data in GM or UB and issuing a separate copy.What changes
pto.mte_fill_l1to the PTO dialect and documents its semantics.llvm.hivm.CREATE.CBUF.MATRIX.v3.u16llvm.hivm.CREATE.CBUF.MATRIX.v3.u32pto.mte_fill_l1(...).Parameter mapping
The hardware configuration operand is assembled as:
Each field is 15 bits.
byte_offsetis applied to the destination pointer before calling the intrinsic, and the low 16 or 32 bits ofraw_valueprovide the repeated fill pattern.Semantically, each repeat fills
block_num_32bconsecutive 32-byte blocks, skipsdst_gap_32bblocks, and then starts the next repeat.Reviewer notes
The main points worth checking are:
create_cbuf_matrix.