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

[UnitTests] Automatic parametrization over targets, with explicit opt-out #8010

Merged
merged 16 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
c2f2e42
[UnitTests] Explicitly list tests that were enabled by TVM_TEST_TARGE…
Lunderberg May 7, 2021
4f1b976
[UnitTests] Automatic parametrize_targets for tests that use (target,…
Lunderberg May 7, 2021
220b72e
[UnitTests] Added ability to explicitly exclude a target from a parti…
Lunderberg May 7, 2021
740cf27
[UnitTests] Refactored test_topi_relu.py to use pytest.mark.parametrize
Lunderberg May 7, 2021
f60d7ee
[UnitTests] Added tvm_known_failing_targets option for the unittests.
Lunderberg May 10, 2021
3fbf78a
[UnitTests] Known failing targets now marked with xfail instead of sk…
Lunderberg May 11, 2021
8fb6281
[UnitTests] Removed tvm_excluded_targets and tvm_known_failing_targets
Lunderberg May 11, 2021
1e9f734
[UnitTests] Added helper functions to tvm.testing.
Lunderberg May 17, 2021
0a59bcf
[UnitTests] Bugfix for auto parametrizing of "target"
Lunderberg May 25, 2021
da24d0f
[UnitTests] Renamed "cache" argument of tvm.testing.fixture to "cache…
Lunderberg May 26, 2021
657c74c
[UnitTests] Minor updates to parametrized test implementation.
Lunderberg May 26, 2021
775ecb8
[UnitTests] Minor updates to parametrized test implementation
Lunderberg May 27, 2021
2a312b5
[UnitTests] Changed accidental use of pytest fixtures to a NameError.
Lunderberg Jun 7, 2021
719cefe
[UnitTests] More careful removal of fixture functions from module glo…
Lunderberg Jun 9, 2021
68afd65
[UnitTests] Copy cached values when using tvm.testing.fixture(cache_r…
Lunderberg Jun 18, 2021
0f17d65
[UnitTests] Added meta-tests for tvm.testing functionality
Lunderberg Jun 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,33 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import tvm.testing
import pytest
from pytest import ExitCode

import tvm
import tvm.testing


def pytest_configure(config):
print("enabled targets:", "; ".join(map(lambda x: x[0], tvm.testing.enabled_targets())))
print("pytest marker:", config.option.markexpr)


@pytest.fixture
def dev(target):
return tvm.device(target)


def pytest_generate_tests(metafunc):
tvm.testing._auto_parametrize_target(metafunc)
tvm.testing._parametrize_correlated_parameters(metafunc)


def pytest_collection_modifyitems(config, items):
tvm.testing._count_num_fixture_uses(items)
tvm.testing._remove_global_fixture_definitions(items)


def pytest_sessionfinish(session, exitstatus):
# Don't exit with an error if we select a subset of tests that doesn't
# include anything
Expand Down
Loading