[llvm] [NVPTX] Add float to tf32 conversion intrinsic (PR #121507)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 13:42:15 PST 2025


================
@@ -1466,6 +1466,15 @@ let TargetPrefix = "nvvm" in {
   def int_nvvm_e5m2x2_to_f16x2_rn_relu : ClangBuiltin<"__nvvm_e5m2x2_to_f16x2_rn_relu">,
       Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoMem, IntrNoCallback]>;
 
+// Convert Float to TF32
+def int_nvvm_cvt_float_to_tf32 : Intrinsic<[llvm_i32_ty],
+    [llvm_float_ty, // Input float
+     llvm_i8_ty,    // Flag for Rounding Modes
----------------
AlexMaclean wrote:

Thanks. cc @andykaylor (original author of constrained fp intrinsics) for any thoughts on if this is still the best way to represent this? I think operand bundles were discussed at one point.

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


More information about the llvm-commits mailing list