Skip to content

Commit a6f8f68

Browse files
authored
Skip torch trt convert test with torch newer than or equal to 2.5.0 (#8165)
Fixes # . ### Description related bug pytorch/pytorch#138674 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <[email protected]>
1 parent 684688a commit a6f8f68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_trt_compile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from monai.networks import trt_compile
2222
from monai.networks.nets import UNet, cell_sam_wrapper, vista3d132
2323
from monai.utils import min_version, optional_import
24-
from tests.utils import skip_if_no_cuda, skip_if_quick, skip_if_windows
24+
from tests.utils import SkipIfAtLeastPyTorchVersion, skip_if_no_cuda, skip_if_quick, skip_if_windows
2525

2626
trt, trt_imported = optional_import("tensorrt", "10.1.0", min_version)
2727
polygraphy, polygraphy_imported = optional_import("polygraphy")
@@ -46,6 +46,7 @@ def tearDown(self):
4646
if current_device != self.gpu_device:
4747
torch.cuda.set_device(self.gpu_device)
4848

49+
@SkipIfAtLeastPyTorchVersion((2, 5, 0))
4950
def test_handler(self):
5051
from ignite.engine import Engine
5152

0 commit comments

Comments
 (0)