Commit c59e1aab authored by Lei Wang's avatar Lei Wang Committed by LeiWang1999
Browse files

[Refactor] Adjust GEMM fragment layout for improved clarity and performance (#504)

* Modified the layout creation in makeGemmFragmentB to enhance the order of operations, ensuring the Replicate method is called before Repeat for better readability and performance.
* This change improves the logical flow of fragment creation, aligning with best practices for GEMM layout management.
parent 8c8d8ca2
...@@ -188,8 +188,8 @@ Fragment makeGemmFragmentB(const int block_m, const int block_n, ...@@ -188,8 +188,8 @@ Fragment makeGemmFragmentB(const int block_m, const int block_n,
ICHECK(block_k % 16 == 0); ICHECK(block_k % 16 == 0);
if (transposed) { if (transposed) {
auto base_layout = makeGemmFragment8x8()->Repeat({1, 2}, false, false); auto base_layout = makeGemmFragment8x8()->Repeat({1, 2}, false, false);
auto warp_layout = base_layout->Repeat({block_n / warp_n, 1}, true, true) auto warp_layout = base_layout->Replicate(block_m / warp_m)
->Replicate(block_m / warp_m); ->Repeat({block_n / warp_n, 1}, true, false);
auto block_layout = auto block_layout =
warp_layout->Repeat({warp_n / 8, block_k / 16}, false, false); warp_layout->Repeat({warp_n / 8, block_k / 16}, false, false);
return block_layout; return block_layout;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment