Fix GPU ABS range - #4345
Conversation
| return bfloat16_t(x * (metal::log(xp1) / (xp1 - 1.0f))); | ||
| } | ||
|
|
||
| inline float complex_abs(float x, float y) { |
There was a problem hiding this comment.
Since this is only used once I think we should just put it in operator()(complex64_t x)
|
Hi @zcbenz gonna resolve this weekend having a trip now sorry ! |
|
Two more sites carry the same I put your diff on a Metal build here (M5 Pro) and ran the two values from the issue through sign and power: The last row stays off because the true result is subnormal and Metal flushes it, which is separate from this.
Either way the helper ends up with three callers across two headers, which is the argument for leaving it in |
|
We should add a hypot utility if we want to reuse the code: |
Proposed changes
Fix #4344
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes