zhiics commented on a change in pull request #4873: [Relay][FastMath] Relay
pass to use fast exp/tanh
URL: https://github.com/apache/incubator-tvm/pull/4873#discussion_r378587789
##########
File path: src/relay/backend/build_module.cc
##########
@@ -307,6 +307,10 @@ class RelayBuildModule : public runtime::ModuleNode {
}
pass_seqs.push_back(transform::FoldConstant());
+ // Fast math optimizations.
+ pass_seqs.push_back(transform::FastMath());
+ pass_seqs.push_back(transform::FoldConstant());
Review comment:
We should create a SequentialPass instead of doing this back-to-back. For
example, you can return `Sequential({FastMathPass, FoldConstant()},
"FastMath")` in fast_math.cc, where `FastMathPass = CreateFunctionPass(....)`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services