[Mlir-commits] [mlir] [MLIR][NVVM] Add support for dp4a instructions (PR #139043)
Durgadoss R
llvmlistbot at llvm.org
Thu May 8 22:36:46 PDT 2025
================
@@ -1590,6 +1597,25 @@ static void nvvmInferResultRanges(Operation *op, Value result,
}
}
+llvm::Intrinsic::ID Dp4aOp::getIntrinsicID(NVVM::DP4aType a_type,
+ NVVM::DP4aType b_type) {
+ bool is_a_siext = a_type == NVVM::DP4aType::S8;
+ bool is_b_siext = b_type == NVVM::DP4aType::S8;
+ unsigned type = (is_a_siext << 1) | is_b_siext;
+ switch (type) {
+ case 0:
+ return llvm::Intrinsic::nvvm_idp4a_u_u;
+ case 1:
+ return llvm::Intrinsic::nvvm_idp4a_u_s;
+ case 2:
+ return llvm::Intrinsic::nvvm_idp4a_s_u;
+ case 3:
+ return llvm::Intrinsic::nvvm_idp4a_s_s;
+ default:
+ llvm_unreachable("Invalid DP4a type");
+ }
----------------
durga4github wrote:
nice!
https://github.com/llvm/llvm-project/pull/139043
More information about the Mlir-commits
mailing list