[Mlir-commits] [mlir] [MLIR][AMDGPU] Add OCP FP8 support for new hardware (PR #106160)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Sep 17 08:24:59 PDT 2024
================
@@ -68,6 +72,15 @@ struct TruncfToFloat16RewritePattern final
} // end namespace
+static LogicalResult isSupportedFp8(Type elementType, Chipset chipset) {
+ if (chipset.isGfx940())
+ return success(elementType.isFloat8E5M2FNUZ() ||
+ elementType.isFloat8E4M3FNUZ());
+ if (chipset.hasOcpFp8())
+ return success(elementType.isFloat8E5M2() || elementType.isFloat8E4M3FN());
----------------
kuhar wrote:
use `isa<T1, T2>(elementType)`
https://github.com/llvm/llvm-project/pull/106160
More information about the Mlir-commits
mailing list