sets maxPhase=4 for mfma4. This is because the nonKDim of mfma4 is less than 16.
Choose warpsPerTile according to mfmaLayout's nonKDim
cleans up format
Before we enable vector access to LDS for non k-major tensors, here are our conventions about LDS accesses:
LDS write
For k-major tensors, swizzling is enabled, i.e. a vector of elements are swizzled in LDS. ds_write are vectorized
For non k-major tensors, a.k.a. mn-major tensors, swizzling is disabled, i.e. elements are written to LDS in their original order. The LLVM backend usually vectorizes ds_write for us, though we write one element at a time.
LDS read
For k-major tensors, normal path is taken since swizzling is enabled.
For non k-major tensors, fast path is taken, since the mapping from an element's coordinates in the tensor to its offsets in the LDS is linear.
Note
If the tensor is k-major, we assume swizzling is enabled. Therefore, we don't allow/test the case where swizzling is disabled for k-major tensors.
This PR
maxPhase=4
for mfma4. This is because the nonKDim of mfma4 is less than 16.Before we enable vector access to LDS for non k-major tensors, here are our conventions about LDS accesses:
Note