[Mlir-commits] [mlir] [mlir][SPIR-V] Lower arith.convertf to widen-then-narrow FConvert pair (PR #212817)
Igor Wodiany
llvmlistbot at llvm.org
Mon Sep 21 03:04:41 PDT 2026
IgWod wrote:
> For Conversion Instructions paragraph it says:
>
> > Conversions to or from floating-point values with the `BFloat16KHR` encoding first convert the source value to IEEE754 binary32, and then from IEEE754 binary32 to the target format.
> > When converting from `BFloat16KHR` to IEEE754 binary32, the additional significand bits are padded with 0s, producing the exact same value.
> > When converting from IEEE754 binary32 to `BFloat16KHR`, the rounding mode is defined by the client API.
I read it as "this is how `FConvert` should work internally for `bf16`" rather than "when converting to to/from `bf16` the convert should be split into two SPIR-V ops". What does `spirv-val` has to say about `FConvert` between `f16` and `bf16` using a single op?
https://github.com/llvm/llvm-project/pull/212817
More information about the Mlir-commits
mailing list