Skip to content

Commit 7f2e648

Browse files
Jiawei-ShaoDawn LUCI CQ
authored andcommitted
[wgsl] Support subgroupMatrixLoad and subgroupMatrixStore with i8 and u8
This patch adds the overloads of `subgroupMatrixLoad` and `subgroupMatrixStore` with `i8` and `u8` as the element types of the subgroup matrices. This patch also fixes the template of the subgroup matrix tests about `i8` and `u8` by replacing all `array<i8>` with `array<i32>` and replacing `array<u8>` with `array<u32>`. Bug: 348702031, 403609083 Test: tint_unittests Change-Id: Id41ddb92b294ab2ce80fd74a533031883868cc45 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/245454 Commit-Queue: Jiawei Shao <[email protected]> Reviewed-by: James Price <[email protected]>
1 parent c794439 commit 7f2e648

File tree

2,632 files changed

+34926
-10713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,632 files changed

+34926
-10713
lines changed

src/tint/lang/core/core.def

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,16 @@ implicit(C: iu32) fn textureStore(texture: texture_storage_3d<u32_texel_format,
788788

789789
@stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<S>, readable>, u32, @const bool, u32) -> T
790790
@stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num, AC: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<S, AC>, readable>, u32, @const bool, u32) -> T
791+
@stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<i32>, readable>, u32, @const bool, u32) -> T
792+
@stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<storage, runtime_array<u32>, readable>, u32, @const bool, u32) -> T
793+
@stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num, AC: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<i32, AC>, readable>, u32, @const bool, u32) -> T
794+
@stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num, AC: num) fn subgroupMatrixLoad<T: subgroup_matrix<K, S, C, R> >(ptr<workgroup_or_storage, array<u32, AC>, readable>, u32, @const bool, u32) -> T
791795
@stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) fn subgroupMatrixStore(ptr<storage, runtime_array<S>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
792796
@stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num, AC: num) fn subgroupMatrixStore(ptr<workgroup_or_storage, array<S, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
797+
@stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) fn subgroupMatrixStore(ptr<storage, runtime_array<i32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
798+
@stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num) fn subgroupMatrixStore(ptr<storage, runtime_array<u32>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
799+
@stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num, AC: num) fn subgroupMatrixStore(ptr<workgroup_or_storage, array<i32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
800+
@stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num, AC: num) fn subgroupMatrixStore(ptr<workgroup_or_storage, array<u32, AC>, writable>, u32, subgroup_matrix<K, S, C, R>, @const bool, u32)
793801
@must_use @stage("compute") implicit(T: subgroup_matrix_elements, C: num, R: num, K: num) fn subgroupMatrixMultiply<TR: subgroup_matrix_elements>(
794802
subgroup_matrix<subgroup_matrix_kind_left, T, K, R>,
795803
subgroup_matrix<subgroup_matrix_kind_right, T, C, K>)

0 commit comments

Comments
 (0)