Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microTVM] Fix test_autotune to support schedules with no tuning space #12484

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

guberti
Copy link
Member

@guberti guberti commented Aug 18, 2022

Currently, tests/micro/common/test_autotune.py passes on main when run on qemu or other microTVM devices (such as the Arduino Due) without the ARM DSP extension. However, when run on Cortex M4 or M7 devices with this extension, the following error is seen:

        logs = list(map(json.loads, str_logs))
>       assert len(logs) == 1 * TUNING_RUNS_PER_OPERATOR  # One operator
E       AssertionError: assert 3 == (1 * 2)
E        +  where 3 = len([{'config': {'code_hash': None, 'entity': [['tile_co', 'sp', [-1, 8]], ['tile_oh', 'sp', [-1, 5]], ['tile_ow', 'sp', [..., 'int32'], {}], 'result': [[0.001604125], 0, 14.074790239334106, 1660810737.063845], 'tvm_version': '0.10.dev0', ...}])

This is because there are two schedules for Arm with DSP, but one of them does not have any tuning space (giving 2 + 1 = 3 total autotuning uploads). This PR fixes the issue by checking the number of tasks extracted, and ensuring the number of tuned runs is in an expected range.

cc @alanmacd @gromero @mehrdadh

@guberti guberti changed the title [bugfix] [microTVM] Fix test_autotune to support schedules with no tuning space [microTVM] Fix test_autotune to support schedules with no tuning space Aug 18, 2022
@github-actions github-actions bot requested a review from mehrdadh August 18, 2022 08:22
@mehrdadh mehrdadh merged commit c0d440d into apache:main Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants