The TanhOp is not properly lowered to LLVM. To address that a phase was added to lower the TanhOp to a C runtime call.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/StandardOps/Transforms/StdOpToCall.cpp | ||
---|---|---|
1 | Please make sure the header fits into 80 cols | |
54 | This is wrong. You should use the pattern rewriter provided as function argument to _create_ ops as well. | |
56 | rewriter.replaceWithNewOp<CallOp>(op, ...) | |
62 | This function should take a PatternRewriter and use it to create the functions instead of defining local builders. | |
mlir/test/Dialect/Standard/tanh.mlir | ||
2 | Can we also check that the appropriate function references were inserted? | |
18 | This file needs a better name |
mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td | ||
---|---|---|
19 | Thanks!! Could you elaborate a bit more on this - using a test pass. Are there examples I can look at? I just modeled this after the ExpandAtomic pass (that was suggested to use as an example - https://reviews.llvm.org/D75509). |
This doesn't really seem like the right granularity for a pass. Seems better to just expose the patterns and use a test pass instead.