We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15f1961 commit 67546dcCopy full SHA for 67546dc
tests/tests_pytorch/models/test_torch_tensorrt.py
@@ -13,6 +13,16 @@
13
from tests_pytorch.helpers.runif import RunIf
14
15
16
+@RunIf(max_torch="2.2.0")
17
+def test_torch_minimum_version():
18
+ model = BoringModel()
19
+ with pytest.raises(
20
+ MisconfigurationException,
21
+ match=re.escape(f"TensorRT export requires PyTorch 2.2 or higher. Current version is {torch.__version__}."),
22
+ ):
23
+ model.to_tensorrt("model.trt")
24
+
25
26
@pytest.mark.skipif(_TORCH_TRT_AVAILABLE, reason="Run this test only if tensorrt is not available.")
27
def test_missing_tensorrt_package():
28
model = BoringModel()
0 commit comments