mbs-octoml commented on a change in pull request #9483:
URL: https://github.com/apache/tvm/pull/9483#discussion_r759577578
##########
File path: src/relay/analysis/call_graph.cc
##########
@@ -64,9 +67,19 @@ void CallGraphNode::AddToCallGraph(const GlobalVar& gv,
const Function& func) {
// post-order visitor will visit each AST node of the current function to
// figure out the dependencies between functions.
PostOrderVisit(func, [&](const Expr& expr) {
- if (const GlobalVarNode* gvn = expr.as<GlobalVarNode>()) {
- auto callee = GetRef<GlobalVar>(gvn);
- cg_node->AddCalledGlobal(LookupGlobalVar(callee));
+ // TODO(mbs): Cleanup shapes functions.
+ if (const auto* call_node = expr.as<CallNode>()) {
+ CallLoweredProps props = GetCallLoweredProps(call_node);
+ if (props.lowered_func.defined() &&
props.attrs.metadata.count("prim_shape_fn_var")) {
Review comment:
Agree, in general these free-form attrs should become first-class
fields, but leaving that to a future refactor.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]