[Mlir-commits] [mlir] [MLIR][NVVM] Add support for Convert Ops with rs-rounding mode (PR #165736)
Srinivasa Ravi
llvmlistbot at llvm.org
Sun Nov 2 21:32:19 PST 2025
================
@@ -1921,6 +1922,95 @@ def NVVM_ConvertF6x2ToF16x2Op :
def NVVM_ConvertF4x2ToF16x2Op :
NVVM_ConvertToFP16x2Op_Base<"F4", I8, "F16">;
+//===----------------------------------------------------------------------===//
+// NVVM Stochastic Rounding Conversion Ops
+//===----------------------------------------------------------------------===//
+
+// Base class for conversions from F32x2 to FPx2 formats
+// (F16x2, BF16x2)
+// TODO: In separate PR, add .rn and .rz rounding variants for this conversion
+// as currently only support .rs rounding mode
+class NVVM_ConvertF32x2ToFPx2OpBase<string dstFormat, string mnemonic, Type resultType> :
+ NVVM_Op<mnemonic, [Pure, NVVMRequiresSMa<[100, 103]>]>,
+ Results<(outs resultType:$dst)>,
+ Arguments<(ins F32:$src_hi, F32:$src_lo, I32:$rbits,
----------------
Wolfram70 wrote:
Should we follow this naming scheme for the other `f32x2.to.fpx2` conversion Ops too? I feel like this makes the return format much clearer.
https://github.com/llvm/llvm-project/pull/165736
More information about the Mlir-commits
mailing list