Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
icemelon committed Mar 26, 2021
1 parent 7334158 commit 248448a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/python/frontend/onnx/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/python/topi/python/test_topi_depthwise_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/python/topi/python/test_topi_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/python/topi/python/test_topi_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 248448a

Please sign in to comment.