This is an automated email from the ASF dual-hosted git repository.
wuwei pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new 751da24bce [Unity][BYOC] Fix `RunCodegen` pass on symbolic shape
(#14472)
751da24bce is described below
commit 751da24bce418c586c3da6f0c484cba9075a193c
Author: masahi <[email protected]>
AuthorDate: Tue Apr 4 08:53:00 2023 +0900
[Unity][BYOC] Fix `RunCodegen` pass on symbolic shape (#14472)
* use sinfo from Call instead of callee func in Runcodegen
* format
---
src/relax/transform/run_codegen.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/relax/transform/run_codegen.cc
b/src/relax/transform/run_codegen.cc
index 5c6b985202..fa726b82af 100644
--- a/src/relax/transform/run_codegen.cc
+++ b/src/relax/transform/run_codegen.cc
@@ -93,7 +93,8 @@ class CodeGenRunner : ExprMutator {
Expr new_func = VisitExpr(func);
if (new_func->IsInstance<ExternFuncNode>()) {
- extern_funcs_[gvar_node] = {new_func, func->ret_struct_info};
+ auto ret_sinfo = GetStructInfo(call);
+ extern_funcs_[gvar_node] = {new_func, ret_sinfo};
// Remove the global symbol and codegen attributes from the function
so that it can be
// removed the module.
static const runtime::PackedFunc* RemoveFuncAttrFunc =
@@ -102,7 +103,7 @@ class CodeGenRunner : ExprMutator {
func = (*RemoveFuncAttrFunc)(func, tvm::attr::kGlobalSymbol);
func = (*RemoveFuncAttrFunc)(func, attr::kCodegen);
builder_->UpdateFunction(gvar, func);
- return create_call_dps_packed(new_func, func->ret_struct_info);
+ return create_call_dps_packed(new_func, ret_sinfo);
}
}
}