Skip to content

Commit 4d27827

Browse files
committed
fix bitserial dense test
Change-Id: Ic1eff47b7cdb9170f71d646461db51cb26e14881
1 parent b062d52 commit 4d27827

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/python/topi/test_topi_bitserial_dense.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ def get_ref_data(a_shape, b_shape, input_dtype):
5454
return a_np, b_np, c_np
5555

5656
for target in ["llvm", "llvm -device=arm_cpu"]:
57-
if "arm_cpu" in target and "arm" not in os.uname()[4]:
57+
target = tvm.target.Target(target)
58+
if "arm_cpu" in target.keys and "arm" not in os.uname()[4]:
5859
print("Skipped running code, not an arm device")
5960
continue
60-
input_dtype = "uint8" if "arm_cpu" in target else "uint32"
61+
input_dtype = "uint8" if "arm_cpu" in target.keys else "uint32"
6162
A = te.placeholder((batch, in_dim), dtype=input_dtype, name="A")
6263
B = te.placeholder((out_dim, in_dim), dtype=input_dtype, name="B")
6364
fcompute, fschedule = tvm.topi.testing.dispatch(target, _bitserial_dense_implement)

0 commit comments

Comments
 (0)