zhiics commented on a change in pull request #5997:
URL: https://github.com/apache/incubator-tvm/pull/5997#discussion_r452396048
##########
File path: src/relay/analysis/get_calibration_data.cc
##########
@@ -45,13 +45,14 @@ namespace relay {
class Collector : public ExprRewriter {
public:
- explicit Collector(const IRModule& module) { glob_funcs_ =
module->functions; }
+ explicit Collector(const IRModule& module) : module_(module) {}
Expr Rewrite_(const CallNode* call, const Expr& post) final {
// check if the function implementation is available
// intrinsic functions are excluded for now
if (call->op->IsInstance<GlobalVarNode>()) {
auto var = Downcast<GlobalVar>(call->op);
+ auto glob_funcs_ = module_->functions;
Review comment:
You actually don't need this.
module has `ContainGlobalVar` to check if var exists and `Lookup` to lookup
for a var.
----------------------------------------------------------------
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]