[Mlir-commits] [mlir] [MLIR][NVVM] Update support for conversions to f8x2 and f6x2 types (PR #137781)

Srinivasa Ravi llvmlistbot at llvm.org
Mon May 5 04:51:14 PDT 2025


================
@@ -176,3 +176,75 @@ llvm.func @nvvm_match_sync_any(%val32: i32, %thread_mask: i32) {
   %0 = nvvm.match.sync any %thread_mask, %val32 : i32 -> !llvm.struct<(i32, i1)>
   llvm.return
 }
+
+// -----
+
+llvm.func @nvvm_cvt_float_to_f8x2_wrong_rounding_e4m3(%a : f32, %b : f32) {
+  // expected-error @below {{Only RN rounding mode and SATFINITE saturation mode are supported for conversions to .e4m3x2 or .e5m2x2 types from f32}}
+  %res = nvvm.cvt.float.to.f8x2 <e4m3> %a, %b {rnd = #nvvm.fp_rnd_mode<rz>, sat = #nvvm.sat_mode<satfinite>} : i16
+  llvm.return
+}
+
+// -----
+
+llvm.func @nvvm_cvt_float_to_f8x2_wrong_rounding_e5m2(%a : f32, %b : f32) {
+  // expected-error @below {{Only RN rounding mode and SATFINITE saturation mode are supported for conversions to .e4m3x2 or .e5m2x2 types from f32}}
----------------
Wolfram70 wrote:

Separated the error messages in the latest revision, thanks!

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


More information about the Mlir-commits mailing list