Details
- Reviewers
ftynse mehdi_amini
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Why does it make sense as a standalone pass rather than as part of a pipeline? This seems a bit "targeted" to go beyond a testing pass.
Could you rather explain what are you trying to achieve? This doesn't necessary make sense in the standard-to-llvm pass either (and the dependency from a conversion on an in-dialect transform looks weird to me). When this conversion was introduced, there were concerns about doing it inside the conversion because not all targets actually want it. In particular, NVVM and ROCm have intrinsics that tanh should be lowered to instead. The solution was to have it in a separate populate* function that the client can call when necessary.
Slightly longer-term, I think tanh should move to the math that is being split out of the standard, at which point we can have this as either a pass on math dialect (when we need to expand, potentially along with other ops that can be expanded within the dialect) or as a conversion from the math dialect to target-specific intrinsics.
Yes, I also felt weird about adding Transforms->Conversion dependency. I think I'll add a target specific (TFRT cpu jit compilation) pass then (FYI cl/354793665)