Skip to content

Commit ce3ae69

Browse files
committed
Replace the te.create_prim_func() with te.create_function()
1 parent e416b4a commit ce3ae69

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎tests/python/relax/test_frontend_onnx.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454

5555

5656
def collect_relax_call_ops(func):
57-
5857
call_ops = set()
5958

6059
def _visit(expr):
@@ -9815,7 +9814,7 @@ def _build_topi_resize2d_nearest_asymmetric_prim_func(input_shape, size, scales=
98159814
rounding_method="",
98169815
scales=scales,
98179816
)
9818-
prim_func = te.create_prim_func([data, resized])
9817+
prim_func = te.create_function([data, resized])
98199818
return resized, prim_func
98209819

98219820

@@ -9830,8 +9829,8 @@ def _run_prim_func(prim_func, input_np, output_shape, target="llvm"):
98309829
is what's being checked.
98319830
"""
98329831
built = tvm.compile(prim_func, target=target)
9833-
data_nd = tvm.runtime.tensor(input_np.astype("float32"))
9834-
out_nd = tvm.runtime.tensor(np.zeros(output_shape, dtype="float32"))
9832+
data_nd = tvm_tirx.runtime.tensor(input_np.astype("float32"))
9833+
out_nd = tvm_tirx.runtime.tensor(np.zeros(output_shape, dtype="float32"))
98359834
built(data_nd, out_nd)
98369835
return out_nd.numpy()
98379836

0 commit comments

Comments
 (0)