Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think it's ok as a fallback for f16/f32, but maybe @mehdi_amini has a different opinion.
Mind changing the atan2 test to run on f16? It should handle all possible cases that way.
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | ||
---|---|---|
399 | Shouldn't this be > 32? |
That's fine with me, I'd be wary that just using f16 blindly in the f32 approximation wouldn't be good enough in terms of precision and that a different expansion would be needed there. This seems safer and we can optimize this for f16 if needed in the future.
Generalize helper a bit so that it could be reused for other fallback approximations.
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | ||
---|---|---|
399 | Indeed :) (I moved these into a helper pattern as that could be made into something a bit more reusable) |
Shouldn't this be > 32?