Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docker/install/ubuntu2004_install_python_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ pip3 install --upgrade \
junitparser==2.4.2 \
six \
tornado \
pytest-lazy-fixture \
git+https://github.com/jax-ml/ml_dtypes.git@v0.2.0
1 change: 0 additions & 1 deletion docker/install/ubuntu_install_python_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ pip3 install --upgrade \
junitparser==2.4.2 \
six \
tornado \
pytest-lazy-fixture \
ml_dtypes
17 changes: 10 additions & 7 deletions tests/python/driver/tvmc/test_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import logging
import sys

from pytest_lazyfixture import lazy_fixture
from unittest import mock

import tvm
Expand Down Expand Up @@ -128,9 +127,10 @@ def fake_directory(tmp_path):

@pytest.mark.parametrize(
"invalid_input",
[lazy_fixture("missing_file"), lazy_fixture("broken_symlink"), lazy_fixture("fake_directory")],
["missing_file", "broken_symlink", "fake_directory"],
)
def test_tvmc_compile_file_check(capsys, invalid_input):
def test_tvmc_compile_file_check(capsys, invalid_input, request):
invalid_input = request.getfixturevalue(invalid_input)
compile_cmd = f"tvmc compile --target 'c' {invalid_input}"
run_arg = compile_cmd.split(" ")[1:]

Expand All @@ -147,9 +147,10 @@ def test_tvmc_compile_file_check(capsys, invalid_input):

@pytest.mark.parametrize(
"invalid_input",
[lazy_fixture("missing_file"), lazy_fixture("broken_symlink"), lazy_fixture("fake_directory")],
["missing_file", "broken_symlink", "fake_directory"],
)
def test_tvmc_tune_file_check(capsys, invalid_input):
def test_tvmc_tune_file_check(capsys, invalid_input, request):
invalid_input = request.getfixturevalue(invalid_input)
tune_cmd = f"tvmc tune --target 'llvm' --output output.json {invalid_input}"
run_arg = tune_cmd.split(" ")[1:]

Expand Down Expand Up @@ -194,13 +195,15 @@ def paddle_model(paddle_resnet50):
@pytest.mark.parametrize(
"model",
[
lazy_fixture("paddle_model"),
"paddle_model",
],
)
# compile_model() can take too long and is tested elsewhere, hence it's mocked below
@mock.patch.object(compiler, "compile_model")
# @mock.patch.object(compiler, "compile_model")
def test_tvmc_compile_input_model(mock_compile_model, tmpdir_factory, model):
def test_tvmc_compile_input_model(mock_compile_model, tmpdir_factory, model, request):

model = request.getfixturevalue(model)
output_dir = tmpdir_factory.mktemp("output")
output_file = output_dir / "model.tar"

Expand Down