[Mlir-commits] [mlir] [mlir][gpu] Add pass for emulating unsupported types. (PR #138087)

Krzysztof Drewniak llvmlistbot at llvm.org
Tue May 6 09:09:11 PDT 2025


krzysz00 wrote:

> One other major reason for me not to touch the conversion is, I personally think the strict verification and validation SPIR-V has in place for unsupported types should stay in place, and the user should make in informed decision if it wants to emulate.

Except that's not actually what's happening here. bf16 _is_ a supported a type on _some_ instructions, you just have to represent it as `i16`.

See also the fact that `amdgpu.mfma` takes stuff like `vector<8xf8E5M2>` and turns that into `i64` during the lowering

Like, bf16 is a semantically meaningful input type for the SPIR-V conversion, even though it doesn't exist in the type system itself, just like `memref`.

ANd similarly, operations on 8-bit floats would be operations on ... byte vectors? packed integers? whatever the extension says it is, really, and that's logic for the *lowering* to handle

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


More information about the Mlir-commits mailing list