diff --git a/src/relay/backend/te_compiler.cc b/src/relay/backend/te_compiler.cc index 64ca4411d083e..2086b90f03375 100644 --- a/src/relay/backend/te_compiler.cc +++ b/src/relay/backend/te_compiler.cc @@ -499,8 +499,7 @@ class TECompilerImpl : public TECompilerNode { using tvm::transform::PassContext; With fresh_pass_ctx_scope(PassContext::Create()); - value->cached_func = - ShapeFuncFor(key->source_func, key->target, GlobalVarSupply::EmptySupply()); + value->cached_func = ShapeFuncFor(key->source_func, key->target, global_var_supply); ICHECK( value->cached_func->funcs->Lookup(value->cached_func->prim_fn_var).as());