feat(vpto): extend fp8 packed ldg stg to x4/x8#987
Open
and0d0 wants to merge 3 commits into
Open
Conversation
This was referenced Jul 24, 2026
Closed
KurrinQu
reviewed
Jul 24, 2026
| buffer_value, index_value = resolve_address_access(ptr_or_ref, offset) | ||
| elem_type = _pointer_element_type(buffer_value, context="stg(value, ptr, offset)") | ||
| raw_value = unwrap_surface_value(value) | ||
| if raw_value.type == elem_type: |
Collaborator
There was a problem hiding this comment.
使用unwrap_surface_value,raw_value是否可能没有type这个属性?需不需要加个判断保护
Zhendong404
requested changes
Jul 24, 2026
| module attributes {pto.target_arch = "a5", pto.kernel_kind = #pto.kernel_kind<vector>} { | ||
| func.func @packed_vector_ldst_kernel( | ||
| %gm_f8e4: !pto.ptr<vector<2xf8E4M3FN>, gm>, | ||
| %gm_f8e4x4: !pto.ptr<vector<4xf8E4M3FN>, gm>, |
| return | ||
| } | ||
| // vector<4xf32> has dim size 4 — rejected (only dim size 2 is supported). | ||
| // vector<4xf32> has dim size 4 — rejected (only fp8 supports 4/8 lanes). |
Collaborator
There was a problem hiding this comment.
扩展后出现了新的应拒类型组合(如 vector<16xf8E4M3FN>、vector<4xf16>、vector<4xi16>、vector<8xi8>),没有任何负例锁定验证器的 lanes 白名单行为
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.
基于#897
扩展的 #917 提到的 fp8 packed store(fp8x2, fp8x4, fp8x8)
ldg/stg:
由
vector<2xf8E4M3FN>
vector<2xf8E5M2>
!pto.hif8x2
增加
vector<4xf8E4M3FN>
vector<4xf8E5M2>
vector<8xf8E4M3FN>
vector<8xf8E5M2>