File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 4444from torch .testing import assert_close
4545from torch .utils ._pytree import tree_flatten , tree_map
4646from torch .utils .data import DataLoader , default_collate
47- from torchvision import _is_cvcuda_available , tv_tensors
47+ from torchvision import tv_tensors
4848from torchvision .ops .boxes import box_iou
4949
5050from torchvision .transforms ._functional_tensor import _max_value as get_max_value
5454from torchvision .transforms .v2 .functional ._geometry import _get_perspective_coeffs , _parallelogram_to_bounding_boxes
5555from torchvision .transforms .v2 .functional ._utils import _get_kernel , _register_kernel_internal
5656
57+ try :
58+ import cvcuda # type: ignore[import-not-found]
5759
58- CVCUDA_AVAILABLE = _is_cvcuda_available ()
60+ CVCUDA_AVAILABLE = True
61+ except ImportError :
62+ CVCUDA_AVAILABLE = False
5963CUDA_AVAILABLE = torch .cuda .is_available ()
6064
6165
Original file line number Diff line number Diff line change @@ -99,15 +99,6 @@ def _is_tracing():
9999 return torch ._C ._get_tracing_state ()
100100
101101
102- def _is_cvcuda_available () -> bool :
103- try :
104- import cvcuda # type: ignore[import-not-found]
105-
106- return True
107- except ImportError :
108- return False
109-
110-
111102def disable_beta_transforms_warning ():
112103 # Noop, only exists to avoid breaking existing code.
113104 # See https://github.com/pytorch/vision/issues/7896
You can’t perform that action at this time.
0 commit comments