32
32
from tvm .relay .testing import byoc
33
33
from tvm .contrib import utils
34
34
from tvm .micro .testing import check_tune_log
35
+ from tvm .target import arm_isa
35
36
36
37
import test_utils
37
38
@@ -87,6 +88,7 @@ def _make_add_sess(temp_dir, model, zephyr_board, west_cmd, build_config, dtype=
87
88
88
89
# The same test code can be executed on both the QEMU simulation and on real hardware.
89
90
@tvm .testing .requires_micro
91
+ @pytest .mark .skip_boards (["mps2_an521" ])
90
92
def test_add_uint (temp_dir , board , west_cmd , tvm_debug ):
91
93
"""Test compiling the on-device runtime."""
92
94
@@ -112,6 +114,7 @@ def test_basic_add(sess):
112
114
113
115
# The same test code can be executed on both the QEMU simulation and on real hardware.
114
116
@tvm .testing .requires_micro
117
+ @pytest .mark .skip_boards (["mps2_an521" ])
115
118
def test_add_float (temp_dir , board , west_cmd , tvm_debug ):
116
119
"""Test compiling the on-device runtime."""
117
120
model = test_utils .ZEPHYR_BOARDS [board ]
@@ -138,6 +141,7 @@ def test_basic_add(sess):
138
141
139
142
140
143
@tvm .testing .requires_micro
144
+ @pytest .mark .skip_boards (["mps2_an521" ])
141
145
def test_platform_timer (temp_dir , board , west_cmd , tvm_debug ):
142
146
"""Test compiling the on-device runtime."""
143
147
@@ -167,6 +171,7 @@ def test_basic_add(sess):
167
171
168
172
169
173
@tvm .testing .requires_micro
174
+ @pytest .mark .skip_boards (["mps2_an521" ])
170
175
def test_relay (temp_dir , board , west_cmd , tvm_debug ):
171
176
"""Testing a simple relay graph"""
172
177
model = test_utils .ZEPHYR_BOARDS [board ]
@@ -199,6 +204,7 @@ def test_relay(temp_dir, board, west_cmd, tvm_debug):
199
204
200
205
201
206
@tvm .testing .requires_micro
207
+ @pytest .mark .skip_boards (["mps2_an521" ])
202
208
def test_onnx (temp_dir , board , west_cmd , tvm_debug ):
203
209
"""Testing a simple ONNX model."""
204
210
model = test_utils .ZEPHYR_BOARDS [board ]
@@ -279,6 +285,7 @@ def check_result(
279
285
280
286
281
287
@tvm .testing .requires_micro
288
+ @pytest .mark .skip_boards (["mps2_an521" ])
282
289
def test_byoc_microtvm (temp_dir , board , west_cmd , tvm_debug ):
283
290
"""This is a simple test case to check BYOC capabilities of microTVM"""
284
291
model = test_utils .ZEPHYR_BOARDS [board ]
@@ -359,6 +366,7 @@ def _make_add_sess_with_shape(temp_dir, model, zephyr_board, west_cmd, shape, bu
359
366
],
360
367
)
361
368
@tvm .testing .requires_micro
369
+ @pytest .mark .skip_boards (["mps2_an521" ])
362
370
def test_rpc_large_array (temp_dir , board , west_cmd , tvm_debug , shape ):
363
371
"""Test large RPC array transfer."""
364
372
model = test_utils .ZEPHYR_BOARDS [board ]
@@ -511,6 +519,11 @@ def test_schedule_build_with_cmsis_dependency(temp_dir, board, west_cmd, tvm_deb
511
519
"""
512
520
model = test_utils .ZEPHYR_BOARDS [board ]
513
521
build_config = {"debug" : tvm_debug }
522
+ target = tvm .target .target .micro (model , options = ["-keys=arm_cpu,cpu" ])
523
+
524
+ isa = arm_isa .IsaAnalyzer (target )
525
+ if not isa .has_dsp_support :
526
+ pytest .skip (f"ISA does not support DSP. target: { target } " )
514
527
515
528
# Create a Relay conv2d
516
529
data_shape = (1 , 16 , 16 , 3 )
@@ -530,7 +543,6 @@ def test_schedule_build_with_cmsis_dependency(temp_dir, board, west_cmd, tvm_deb
530
543
ir_mod = tvm .IRModule .from_expr (func )
531
544
532
545
runtime = Runtime ("crt" , {"system-lib" : True })
533
- target = tvm .target .target .micro (model , options = ["-keys=arm_cpu,cpu" ])
534
546
535
547
with tvm .transform .PassContext (opt_level = 3 , config = {"tir.disable_vectorize" : True }):
536
548
mod = tvm .relay .build (ir_mod , target = target , runtime = runtime )
0 commit comments