File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,22 @@ def check_cross_compile_trt_win_lib() -> bool:
4040 return False
4141
4242
43+ def is_tensorrt_rtx_version_supported (min_version : str ) -> bool :
44+ """
45+ Check if the installed TensorRT-RTX version supports the specified minimum version.
46+ Args:
47+ min_version (str): Minimum required TensorRT-RTX version
48+ Returns:
49+ bool: True if TensorRT-RTX version is >= min_version, False otherwise
50+ """
51+ if trt ._package_name != "tensorrt_rtx" :
52+ return True
53+
54+ from packaging .version import Version
55+
56+ return bool (Version (trt .__version__ ) >= Version (min_version ))
57+
58+
4359def is_tensorrt_version_supported (min_version : str ) -> bool :
4460 """
4561 Check if the installed TensorRT version supports the specified minimum version.
Original file line number Diff line number Diff line change 44import pytest
55import torch
66import torch_tensorrt
7+ from torch_tensorrt ._utils import is_tensorrt_rtx_version_supported
78
89if importlib .util .find_spec ("transformers" ):
910 import transformers
2122 "transformers is required to run this test" ,
2223)
2324def test_dynamic_head_dim_with_hf_model (dtype , decompose_attention ):
25+ if (
26+ torch_tensorrt .ENABLED_FEATURES .tensorrt_rtx
27+ and not is_tensorrt_rtx_version_supported ("1.6" )
28+ ):
29+ pytest .skip (
30+ "TensorRT-RTX >= 1.6 is required because it fixed some accuracy issues for FP16"
31+ )
32+ return
33+
2434 from transformers import AutoModelForCausalLM
2535
2636 model_name = "Qwen/Qwen2.5-0.5B-Instruct"
You can’t perform that action at this time.
0 commit comments