diff --git a/python/tvm/topi/utils.py b/python/tvm/topi/utils.py index f6ca03d32742..91e29665cda3 100644 --- a/python/tvm/topi/utils.py +++ b/python/tvm/topi/utils.py @@ -22,7 +22,7 @@ import numpy as np import tvm -from tvm import relay, te +from tvm import te from tvm.tir import bijective_layout, layout from . import cpp, tag @@ -455,7 +455,7 @@ def change_constant_shape(src, src_layout, dst_layout): assert src_layout.isalpha() and dst_layout.isalpha() axis_order = [src_layout.index(c) for c in dst_layout] reshaped = np.transpose(src.data.numpy(), axis_order) - return relay.Constant(tvm.nd.array(reshaped)) + return tvm.relay.Constant(tvm.nd.array(reshaped)) def within_index(b, e, s, i):