[OPTIMIZER] Improved layout simplification pass so it handles swizzled layouts better (#789)

Note: uncommented `test_gemm`, since backend has an issue with swizzling. This will get uncommented in a subsequent PR.
This commit is contained in:
Philippe Tillet
2022-10-20 19:03:37 -07:00
committed by GitHub
parent 0d22d2bc03
commit dc0588a898
7 changed files with 68 additions and 28 deletions

View File

@@ -50,8 +50,6 @@ struct SwizzlePass : public TritonGPUSwizzleBase<SwizzlePass> {
int vec = order[0] == 1 ? mat_shape[2] : mat_shape[0]; // k : m
int mmaStride = order[0] == 1 ? mat_shape[0] : mat_shape[2];
int maxPhase = mmaStride / perPhase;
std::cout << perPhase << " " << mat_shape[0] << " " << mat_shape[1]
<< " " << mat_shape[2] << std::endl;
return SwizzleInfo{vec, perPhase, maxPhase};
}
// compute swizzling for B operand