The SPIRV targets are supposed to be generic, but some HW still don't
support the Fma instruction. Add the __builtin_has_hw_fma32() builtin
function to let the implementation express whether it has hardware FMA
support or not.
Depends on: D85911
Differential D85910
libclc: Add a __builtin to let SPIRV targets select between SW and HW FMA daniels on Aug 13 2020, 8:27 AM. Authored by
Details The SPIRV targets are supposed to be generic, but some HW still don't Depends on: D85911
Diff Detail
Event Timeline
|
From discussion on the corresponding Mesa merge request that would handle this builtin function call (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035#note_606348), I think this would be better as defined, non-inlined function. That way, we get the best of both worlds:
We might need to have a dedicated .cl file for the definition though, rather than defining it inline, just to avoid violating the one-definition-rule here. And we should probably do the same thing for subnormal controls, rather than just setting them to false.