diff --git a/.github/scripts/install-torch-tensorrt.sh b/.github/scripts/install-torch-tensorrt.sh index 67a3c9fe29..65ce1807ed 100755 --- a/.github/scripts/install-torch-tensorrt.sh +++ b/.github/scripts/install-torch-tensorrt.sh @@ -43,6 +43,8 @@ PY python -m pip uninstall -y torch torchvision python -m pip install --force-reinstall --pre ${TORCHVISION} --index-url ${INDEX_URL} --extra-index-url https://pypi.org/simple python -m pip install --force-reinstall --pre ${TORCH} --index-url ${INDEX_URL} --extra-index-url https://pypi.org/simple +# dynamo-torchao full/nightly suite +python -m pip install torchao # If CUDA 13 (cu13), prepend venv's NVIDIA CUDA 13 libs to LD_LIBRARY_PATH if [[ "${CU_VERSION}" == cu13* ]]; then diff --git a/tests/ci/suites.py b/tests/ci/suites.py index 5e5fa2bf4b..3fd3fc06eb 100644 --- a/tests/ci/suites.py +++ b/tests/ci/suites.py @@ -237,9 +237,17 @@ def for_variant(self, variant: Variant) -> dict[str, Any]: tier="l2", lanes=("full", "nightly"), paths=("models/",), - markers="not critical", + # TorchAO compile tests live in dynamo-torchao. + markers="not critical and not torchao", jobs=_MODEL, ), + Suite( + "dynamo-torchao", + tier="l2", + lanes=("full", "nightly"), + paths=("models/test_torchao*.py",), + jobs=_HEAVY, + ), Suite( "dynamo-llm", tier="l2", diff --git a/tests/py/dynamo/models/conftest.py b/tests/py/dynamo/models/conftest.py index a9172c97bf..9287afc349 100644 --- a/tests/py/dynamo/models/conftest.py +++ b/tests/py/dynamo/models/conftest.py @@ -22,3 +22,19 @@ def pytest_addoption(parser): def ir(request): ir_opt = request.config.getoption("--ir") return ir_opt[0] if ir_opt else "dynamo" + + +def pytest_configure(config): + config.addinivalue_line( + "markers", + "torchao: TorchAO quantization compile tests; collected by the dynamo-torchao full-lane suite", + ) + + +def pytest_collection_modifyitems(config, items): + """Mark TorchAO model tests so the dynamo-torchao suite can own them.""" + marker = pytest.mark.torchao + for item in items: + path = str(getattr(item, "path", item.fspath)) + if "test_torchao" in path: + item.add_marker(marker)