From 01b01478094e0f5203c991c91b65ad612e5daa9a Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Fri, 10 Sep 2021 03:09:58 -0700 Subject: [PATCH 1/2] fix bad merge --- tests/micro/zephyr/conftest.py | 1 + tests/micro/zephyr/test_zephyr.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/micro/zephyr/conftest.py b/tests/micro/zephyr/conftest.py index f7b3b3e31efb..7c19b62ac63d 100644 --- a/tests/micro/zephyr/conftest.py +++ b/tests/micro/zephyr/conftest.py @@ -56,6 +56,7 @@ def zephyr_boards() -> dict: def pytest_addoption(parser): parser.addoption( "--zephyr-board", + required=True, choices=ZEPHYR_BOARDS.keys(), help=("Zephyr board for test."), ) diff --git a/tests/micro/zephyr/test_zephyr.py b/tests/micro/zephyr/test_zephyr.py index c12b6e3f5292..8554eeb8d18e 100644 --- a/tests/micro/zephyr/test_zephyr.py +++ b/tests/micro/zephyr/test_zephyr.py @@ -380,11 +380,11 @@ def test_tensors(sess): @tvm.testing.requires_micro -def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug): +def test_autotune_conv2d(temp_dir, board, west_cmd, tvm_debug): """Test AutoTune for microTVM Zephyr""" import tvm.relay as relay - model, zephyr_board = PLATFORMS[platform] + model = conftest.ZEPHYR_BOARDS[board] # Create a Relay model data_shape = (1, 3, 16, 16) @@ -424,7 +424,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug): module_loader = tvm.micro.AutoTvmModuleLoader( template_project_dir=template_project_dir, project_options={ - "zephyr_board": zephyr_board, + "zephyr_board": board, "west_cmd": west_cmd, "verbose": 1, "project_type": "host_driven", @@ -467,7 +467,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug): lowered, temp_dir / "project", { - "zephyr_board": zephyr_board, + "zephyr_board": board, "west_cmd": west_cmd, "verbose": 1, "project_type": "host_driven", @@ -496,7 +496,7 @@ def test_autotune_conv2d(temp_dir, platform, west_cmd, tvm_debug): lowered_tuned, temp_dir / "project", { - "zephyr_board": zephyr_board, + "zephyr_board": board, "west_cmd": west_cmd, "verbose": 1, "project_type": "host_driven", From 29c55d66926f6bd21ffd533607e3cb5a2d3b246f Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Fri, 10 Sep 2021 08:30:51 -0700 Subject: [PATCH 2/2] Fix test to reflect change of simd size for ARM --- tests/python/relay/aot/test_crt_aot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/python/relay/aot/test_crt_aot.py b/tests/python/relay/aot/test_crt_aot.py index 68a9b0b436e7..e117302d0ed8 100644 --- a/tests/python/relay/aot/test_crt_aot.py +++ b/tests/python/relay/aot/test_crt_aot.py @@ -562,9 +562,9 @@ def test_name_sanitiser_name_clash(): @pytest.mark.parametrize( "workspace_byte_alignment,main_workspace_size,sum_workspace_size", [ - (8, 10368, 15392), - (16, 10368, 15424), - (256, 10752, 17664), + (8, 10368, 15200), + (16, 10368, 15232), + (256, 10752, 17408), ], ) def test_memory_planning(workspace_byte_alignment, main_workspace_size, sum_workspace_size):