diff --git a/tests/python/frontend/onnx/test_forward.py b/tests/python/frontend/onnx/test_forward.py index d62d17c7798d..9116b0976409 100644 --- a/tests/python/frontend/onnx/test_forward.py +++ b/tests/python/frontend/onnx/test_forward.py @@ -68,8 +68,9 @@ def get_tvm_output( graph_def, input_data, target, device, output_shape=None, output_dtype="float32", opset=None ): """ Generic function to execute and get tvm output""" - # TODO: Remove the following line + # TODO: Resolve the issues and remove the following lines target = "llvm" + device = tvm.cpu(0) input_names, shape_dict = get_input_data_shape_dict(graph_def, input_data) diff --git a/tests/python/topi/python/test_topi_depthwise_conv2d.py b/tests/python/topi/python/test_topi_depthwise_conv2d.py index 5bb4a9cba3d4..91ee1ee02fe4 100644 --- a/tests/python/topi/python/test_topi_depthwise_conv2d.py +++ b/tests/python/topi/python/test_topi_depthwise_conv2d.py @@ -78,7 +78,7 @@ def compile_depthwise_NHWC_int8_arm( bias = te.placeholder((in_channel * depth_multiplier,), name="bias", dtype="int32") dtype = "int32" - target = "llvm -target=arm_cpu -mtriple=aarch64-linux-gnu" + target = "llvm -device=arm_cpu -mtriple=aarch64-linux-gnu" compute = topi.arm_cpu.compute_depthwise_conv2d_nhwc schedule = topi.arm_cpu.schedule_depthwise_conv2d_nhwc diff --git a/tests/python/topi/python/test_topi_math.py b/tests/python/topi/python/test_topi_math.py index 0e0367119075..e2d978190877 100644 --- a/tests/python/topi/python/test_topi_math.py +++ b/tests/python/topi/python/test_topi_math.py @@ -183,7 +183,7 @@ def verify(from_dtype, to_dtype, low=-100, high=100): s = tvm.topi.testing.get_injective_schedule(target)(B) foo = tvm.build(s, [A, B], target) a = tvm.nd.array(a_np, dev) - b = tvm.nd.empty(shape=shape, dtype=to_dtype, target=dev) + b = tvm.nd.empty(shape=shape, dtype=to_dtype, device=dev) foo(a, b) tvm.testing.assert_allclose(b.asnumpy(), b_np) @@ -219,7 +219,7 @@ def check_target(target): tvm.testing.assert_allclose(b.asnumpy(), b_np, rtol=1e-5, atol=1e-5) check_target("llvm") - check_target("llvm -target=arm-cpu") + check_target("llvm -device=arm-cpu") test_apply(topi.fast_exp, "fast_exp", np.exp, low=-88, high=88, step=0.01) test_apply(topi.fast_erf, "fast_erf", scipy.special.erf, low=-10, high=10, step=0.01) diff --git a/tests/python/topi/python/test_topi_sort.py b/tests/python/topi/python/test_topi_sort.py index 9af64441b222..c52dc8d3929a 100644 --- a/tests/python/topi/python/test_topi_sort.py +++ b/tests/python/topi/python/test_topi_sort.py @@ -156,7 +156,7 @@ def check_target(target): tvm_data = tvm.nd.array(np_data, dev) tvm_res = [] for t in outs: - tvm_res.append(tvm.nd.empty(t.shape, dtype=t.dtype, target=dev)) + tvm_res.append(tvm.nd.empty(t.shape, dtype=t.dtype, device=dev)) f = tvm.build(s, [data] + outs, target) f(tvm_data, *tvm_res) if ret_type == "both":