Skip to content

Commit

Permalink
Skip torch trt convert test with torch newer than or equal to 2.5.0 (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
KumoLiu authored Oct 23, 2024
1 parent 684688a commit a6f8f68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_trt_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from monai.networks import trt_compile
from monai.networks.nets import UNet, cell_sam_wrapper, vista3d132
from monai.utils import min_version, optional_import
from tests.utils import skip_if_no_cuda, skip_if_quick, skip_if_windows
from tests.utils import SkipIfAtLeastPyTorchVersion, skip_if_no_cuda, skip_if_quick, skip_if_windows

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

@SkipIfAtLeastPyTorchVersion((2, 5, 0))
def test_handler(self):
from ignite.engine import Engine

Expand Down

0 comments on commit a6f8f68

Please sign in to comment.