slyubomirsky commented on code in PR #16356:
URL: https://github.com/apache/tvm/pull/16356#discussion_r1480561702
##########
src/script/printer/relax/utils.h:
##########
@@ -82,10 +84,47 @@ inline Optional<ExprDoc> StructInfoAsAnn(const relax::Var&
v, const ObjectPath&
if (!v->struct_info_.defined()) {
return NullOpt;
}
+ bool attempt_to_hide_struct_info = !d->cfg->show_all_struct_info;
+
if (const auto* call = rhs.as<relax::CallNode>()) {
static const Op& call_tir_op = Op::Get("relax.call_tir");
static const Op& call_dps_packed_op = Op::Get("relax.call_dps_packed");
if (call->op.same_as(call_tir_op) || call->op.same_as(call_dps_packed_op))
{
+ attempt_to_hide_struct_info = true;
+ }
+ }
+ if (attempt_to_hide_struct_info) {
Review Comment:
It seems a little like overkill, but we _are_ running the normalizer between
every pass anyway so I guess it's not so bad.
e: And you're right, it's futureproof too.
--
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]