[Mlir-commits] [mlir] [mlir][spirv] Add bfloat16 support (PR #141458)

Darren Wihandi llvmlistbot at llvm.org
Wed Jun 4 22:47:54 PDT 2025


fairywreath wrote:

> Thank you so much for adding this @fairywreath.
> 
> I have a few comments. What is opinion on creating TypeAlias for SPIR-V BF16 (I put a potential example in the comment)? It has some good nice things that comes with it. The verification can be easier to handle. But your current approach is also fine, just different perspective.
> 
> P.S.> I had downstream solution, never got around to upstream it. You can check it out if it helps: https://github.com/intel/mlir-extensions/blob/main/build_tools/patches/0009-SPIR-V-Enable-native-bf16-support-in-SPIR-V-dialect.patch

Thanks for the review! I agree with your suggestions and have changed the definitions accordingly. I have also integrated changes from your downstream solution, specifically the serializer/deserializer changes. The changes from your downstream solution that I did not integrate are the CL ops and the arithmetic ops(which Vulkan does not support for bf16).

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


More information about the Mlir-commits mailing list