[Mlir-commits] [mlir] [MLIR][NVVM] Add support for f6x2 conversion (PR #136537)

Srinivasa Ravi llvmlistbot at llvm.org
Thu Apr 24 22:14:30 PDT 2025


================
@@ -1290,6 +1291,23 @@ llvm::Intrinsic::ID CvtFloatToTF32Op::getIntrinsicID(NVVM::FPRoundingMode rnd,
   }
 }
 
+#define CVT_TO_F6X2_ID_IMPL(type, has_relu)                                    \
+  has_relu ? llvm::Intrinsic::nvvm_ff_to_##type##_rn_relu_satfinite            \
+           : llvm::Intrinsic::nvvm_ff_to_##type##_rn_satfinite
+
+llvm::Intrinsic::ID CvtToF6x2Op::getIntrinsicID(NVVM::CVTFP6Type type,
+                                                bool hasRelu) {
+  switch (type) {
+  case NVVM::CVTFP6Type::E2M3:
+    return CVT_TO_F6X2_ID_IMPL(e2m3x2, hasRelu);
+  case NVVM::CVTFP6Type::E3M2:
+    return CVT_TO_F6X2_ID_IMPL(e3m2x2, hasRelu);
+  default:
+    break;
+  }
+  llvm_unreachable("Invalid CVTFP6Type for CvtToF6x2Op");
----------------
Wolfram70 wrote:

Fixed, thanks!

https://github.com/llvm/llvm-project/pull/136537


More information about the Mlir-commits mailing list