[Mlir-commits] [mlir] [MLIR][AMDGPU] Add OCP FP8 support for new hardware (PR #106160)

Jakub Kuderski llvmlistbot at llvm.org
Thu Sep 19 10:49:03 PDT 2024


================
@@ -454,6 +454,20 @@ static void wmmaPushOutputOperand(ConversionPatternRewriter &rewriter,
   }
 }
 
+/// Return true if `type` is the E5M2 variant of an 8-bit float that is
+/// supported by the `_bf8` instructions on the given `chipset`.
+static bool isNativeBf8(Chipset chipset, Type type) {
----------------
kuhar wrote:

>  Also, in a context in which we're doing isa<T1,T2>() and isFloat(), "is" flows better.

The issue with chains of `.isType` is that it won't be optimized across multiple types and always performed one by one (with short circuiting). Our casting infra might not do it today, but in order to utilize faster 'group' isa, you have to use it across the codebase in the first place.

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


More information about the Mlir-commits mailing list