electriclilies commented on a change in pull request #9312:
URL: https://github.com/apache/tvm/pull/9312#discussion_r737004769
##########
File path: src/relay/op/vm/vm.cc
##########
@@ -195,6 +195,46 @@ RELAY_REGISTER_OP("vm.invoke_tvm_op")
return {topi::identity(inputs[0])};
});
+// call_lowered
+bool CallTIRRel(const Array<Type>& types, int num_inputs, const Attrs& attrs,
+ const TypeReporter& reporter) {
+ // Types = [func, args, ret_type]
+ ICHECK_EQ(types.size(), 3u);
+ auto func_type = types[0].as<FuncTypeNode>();
+ ICHECK(func_type != nullptr) << "input must be operator with known type";
+ auto input_type = types[1].as<TupleTypeNode>();
+ ICHECK(input_type != nullptr)
+ << "internal invariant violated: call_lowered inputs must be a tuple";
+ reporter->Assign(types[2], func_type->ret_type);
+ return true;
+}
+
+Expr CallTIR(Expr func, Expr inputs, Attrs attrs) {
Review comment:
Done
--
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]