Skip to content

add --no-deps for tests/py/requirements.txt #3569

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

Merged
merged 7 commits into from
Jun 12, 2025
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
9 changes: 9 additions & 0 deletions .github/workflows/build-test-linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ jobs:
pushd .
cd tests/py
python -m pip install -r requirements.txt
major=${PYTHON_VERSION%%.*}
minor=${PYTHON_VERSION#*.}
minor=${minor%%.*}
if (( major > 3 || (major == 3 && minor >= 13) )); then
echo "flashinfer-python is not supported for python version 3.13 or higher"
else
echo "Installing flashinfer-python"
python -m pip install flashinfer-python --no-deps
fi
cd dynamo
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin.py
Expand Down
11 changes: 6 additions & 5 deletions py/torch_tensorrt/dynamo/lowering/passes/constant_folding.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any
from typing import Any, Set

import torch
from torch_tensorrt._utils import sanitized_torch_version
Expand Down Expand Up @@ -100,12 +100,13 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)

def is_impure(self, node: torch.fx.node.Node) -> bool:
# Set of known quantization ops to be excluded from constant folding.
# Set of known quantization ops to be excluded from constant folding.
# Currently, we exclude all quantization ops coming from modelopt library.
quantization_ops = {}
quantization_ops: Set[torch._ops.OpOverload] = set()
try:
# modelopt import ensures torch.ops.tensorrt.quantize_op.default is registered
import modelopt.torch.quantization as mtq
# modelopt import ensures torch.ops.tensorrt.quantize_op.default is registered
import modelopt.torch.quantization as mtq # noqa: F401

assert torch.ops.tensorrt.quantize_op.default
quantization_ops.add(torch.ops.tensorrt.quantize_op.default)
except Exception as e:
Expand Down
1 change: 0 additions & 1 deletion tests/py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pytest>=8.2.1
pytest-xdist>=3.6.1
pyyaml
timm>=1.0.3
flashinfer-python; python_version < "3.13"
transformers==4.49.0
nvidia-modelopt[all]~=0.27.0; python_version >'3.9' and python_version <'3.13'
--extra-index-url https://pypi.nvidia.com
Loading