Skip to content

Commit ff637a1

Browse files
Add additional Subgroup 2D Block IO Linear Layout conversion test (#4495)
Adds a test for an important GEMM example from AxB. --------- Co-authored-by: Whitney Tsang <[email protected]>
1 parent 4ab6871 commit ff637a1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

third_party/intel/unittest/Dialect/TritonIntelGPU/LinearLayoutConversionsTest.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,23 @@ TEST_F(LinearLayoutConversionsTest, FP16_32x16x2_M256_N32_K32_B) {
128128
{S("dim0"), S("dim1")}));
129129
}
130130

131+
TEST_F(LinearLayoutConversionsTest, FP16_16x16x2_M256_N32_K32_B) {
132+
EXPECT_EQ(subgroup2DBlockToLinearLayout(
133+
/*shape*/ {32, 256},
134+
sdb(/*instrShape*/ {16, 16}, /*numBlocks*/ 2, /*kWidth*/ 2,
135+
/*warpsPerCTA*/ {8, 4}, /*repCluster*/ {4, 2},
136+
/*blockShape*/ {32, 256}, /*opsPerChannel*/ 2,
137+
/*opIdx*/ 1),
138+
/*kWidth*/ 2),
139+
LinearLayout(
140+
{{S("register"),
141+
{{1, 0}, {2, 0}, {4, 0}, {8, 0}, {0, 16}, {16, 0}, {0, 128}}},
142+
{S("lane"), {{0, 1}, {0, 2}, {0, 4}, {0, 8}}},
143+
{S("warp"), {{0, 32}, {0, 64}, {0, 0}, {0, 0}, {0, 0}}},
144+
{S("block"), {}}},
145+
{S("dim0"), S("dim1")}));
146+
}
147+
131148
TEST_F(LinearLayoutConversionsTest, I8_16x32x1_M64_N128_K32_A) {
132149
EXPECT_EQ(
133150
subgroup2DBlockToLinearLayout(

0 commit comments

Comments
 (0)