On 8/7/24 1:16 AM, Jakub Jelinek wrote:


This looks all wrong to me.

On all the other targets that already do support __bf16 type it is a storage
only type, so all arithmetics on it is expected to be done on float, not in
__bf16.
RISC-V has (via extensions) degrees of arithmetic/conversion support, so for example it can do a multiply-add of bf16 operands widening to float.


So, if riscv wants something different (will there by e.g. any libm
implementation with all the __bf16 APIs though?), it should ask for it some way
(target hook or whatever) and only in that case it should enable the other
builtins, libgcc APIs etc.
ISTM for the limited cases where we want native bf16 support we could just have target specific builtins.

I'm not sure what the motivation is behind trying to support the richer set of operations really is. So perhaps Xiao could start with explaining why this is important.

jeff

Reply via email to