tqchen commented on code in PR #17599:
URL: https://github.com/apache/tvm/pull/17599#discussion_r2057120562


##########
src/relax/transform/legalize_ops.cc:
##########
@@ -152,6 +164,68 @@ class LegalizeMutator : public ExprMutator {
     return NullOpt;
   }
 
+  Expr UpdateVDeviceOutStructInfo(Expr expr, const Call& visited_call) {
+    static const auto& infer_struct_info_map = 
Op::GetAttrMap<FInferStructInfo>("FInferStructInfo");
+    static const Op& call_tir_op = Op::Get("relax.call_tir");
+    auto* op_node = visited_call->op.as<OpNode>();
+
+    // Not an OpNode
+    if (op_node == nullptr) {
+      return expr;
+    }
+    auto op = GetRef<Op>(op_node);
+
+    if (!infer_struct_info_map.count(op)) {
+      return expr;
+    }
+
+    if (!expr->IsInstance<CallNode>()) {
+      return expr;
+    }
+
+    auto call = Downcast<Call>(expr);
+    if (call->op != call_tir_op) {
+      return expr;
+    }
+
+    StructInfo out_sinfo = call->sinfo_args[0];
+    StructInfo infered_sinfo = infer_struct_info_map[op](visited_call, 
builder_);

Review Comment:
   @srkreddy1238 seems this one is not yet resolved?



-- 
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]

Reply via email to