[Mlir-commits] [llvm] [mlir] [MLIR][NVVM] Support stmatrix intrinsics (PR #148377)
Durgadoss R
llvmlistbot at llvm.org
Mon Jul 21 02:54:29 PDT 2025
================
@@ -164,6 +164,50 @@ static llvm::Intrinsic::ID getLdMatrixIntrinsicId(NVVM::MMALayout layout,
}
}
+/// Return the intrinsic ID associated with stmatrix for the given paramters.
+static llvm::Intrinsic::ID
+getStMatrixIntrinsicId(NVVM::MMALayout layout, int32_t num,
+ NVVM::LdStMatrixShapeAttr shape,
+ NVVM::LdStMatrixEltType eltType) {
+ if (shape.getM() == 8 && shape.getN() == 8) {
+ if (eltType == NVVM::LdStMatrixEltType::B16) {
+ if (layout == NVVM::MMALayout::row) {
+ switch (num) {
+ case 1:
+ return llvm::Intrinsic::nvvm_stmatrix_sync_aligned_m8n8_x1_b16;
----------------
durga4github wrote:
can we do a ternary on the `layout` here, making it a bit less verbose?
https://github.com/llvm/llvm-project/pull/148377
More information about the Mlir-commits
mailing list