[Mlir-commits] [mlir] [MLIR][NVVM] Update support for conversions to f8x2 and f6x2 types (PR #137781)
Srinivasa Ravi
llvmlistbot at llvm.org
Mon May 12 22:23:27 PDT 2025
================
@@ -1120,6 +1121,153 @@ def NVVM_CvtToF6x2Op : NVVM_Op<"cvt.to.f6x2"> {
}];
}
+def CVTFP8E4M3 : I32EnumAttrCase<"E4M3", 0, "e4m3">;
+def CVTFP8E5M2 : I32EnumAttrCase<"E5M2", 1, "e5m2">;
+def CVTFP8UE8M0 : I32EnumAttrCase<"UE8M0", 2, "ue8m0">;
----------------
Wolfram70 wrote:
I actually tried using the builtin types ( `f8e4m3fn`, `f8e5m2`, and `f8e8m0fnu`) for this Op but ran into issues during lowering to LLVMIR and bitcasting the vector to a packed i16 for the intrinsics since it looks like the vectors of these types cannot be constructed/are supported and an assertion fails due to `mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp:821:isCompatibleVectorType()`.
https://github.com/llvm/llvm-project/pull/137781
More information about the Mlir-commits
mailing list