Skip to content

Commit 3a1ac29

Browse files
committed
fix bad merge
1 parent b5c4aa3 commit 3a1ac29

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

tests/micro/zephyr/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import datetime
1818
import os
1919
import pathlib
20+
from typing_extensions import Required
2021

2122
import pytest
2223

@@ -56,6 +57,7 @@ def zephyr_boards() -> dict:
5657
def pytest_addoption(parser):
5758
parser.addoption(
5859
"--zephyr-board",
60+
required=True,
5961
choices=ZEPHYR_BOARDS.keys(),
6062
help=("Zephyr board for test."),
6163
)

tests/micro/zephyr/test_zephyr.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,11 @@ def test_tensors(sess):
380380

381381

382382
@tvm.testing.requires_micro
383-
def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug):
383+
def test_autotune_conv2d(temp_dir, board, west_cmd, tvm_debug):
384384
"""Test AutoTune for microTVM Zephyr"""
385385
import tvm.relay as relay
386386

387-
model, zephyr_board = PLATFORMS[platform]
387+
model = conftest.ZEPHYR_BOARDS[board]
388388

389389
# Create a Relay model
390390
data_shape = (1, 3, 16, 16)
@@ -424,7 +424,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug):
424424
module_loader = tvm.micro.AutoTvmModuleLoader(
425425
template_project_dir=template_project_dir,
426426
project_options={
427-
"zephyr_board": zephyr_board,
427+
"zephyr_board": board,
428428
"west_cmd": west_cmd,
429429
"verbose": 1,
430430
"project_type": "host_driven",
@@ -467,7 +467,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug):
467467
lowered,
468468
temp_dir / "project",
469469
{
470-
"zephyr_board": zephyr_board,
470+
"zephyr_board": board,
471471
"west_cmd": west_cmd,
472472
"verbose": 1,
473473
"project_type": "host_driven",
@@ -496,7 +496,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug):
496496
lowered_tuned,
497497
temp_dir / "project",
498498
{
499-
"zephyr_board": zephyr_board,
499+
"zephyr_board": board,
500500
"west_cmd": west_cmd,
501501
"verbose": 1,
502502
"project_type": "host_driven",

0 commit comments

Comments
 (0)