[Mlir-commits] [mlir] [mlir][spirv] Convert `bf16` to `spirv` as a `i16` (PR #76114)
Rob Suderman
llvmlistbot at llvm.org
Thu Dec 21 15:08:14 PST 2023
rsuderman wrote:
> I don't have much context on the state of bf16 in the codebase, but does it do anything meaningful after we convert it to i16 in the SPIR-V type converter?
>
> I'd think that we end up in a situation where we have something like `arith.addf %x, %y : bf16` that flows into spir-v conversion patterns as `arith.addf %x, %y : i16` via the adaptor but nothing in the conversion pattern expects integer types and we and up generating something that doesn't typecheck and fails to verify, or crashes when we assume fp types.
>
> Can we do the type conversion / emulation via fp32 before we go to SPIR-V?
I reworked the downstream pass to explicitly run a cleanup instead. Closing this PR.
https://github.com/llvm/llvm-project/pull/76114
More information about the Mlir-commits
mailing list