ultralytics 8.3.19 TensorRT 10.5.0 support (#17076)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
71624018e2
commit
767aa1cacc
4 changed files with 7 additions and 7 deletions
|
|
@ -41,8 +41,8 @@ ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
|
||||||
|
|
||||||
# Install pip packages
|
# Install pip packages
|
||||||
RUN python3 -m pip install --upgrade pip wheel
|
RUN python3 -m pip install --upgrade pip wheel
|
||||||
# Pin TensorRT-cu12==10.1.0 to avoid 10.2.0 bug https://github.com/ultralytics/ultralytics/pull/14239 (note -cu12 must be used)
|
# Note -cu12 must be used with tensorrt)
|
||||||
RUN pip install -e ".[export]" "tensorrt-cu12==10.1.0" "albumentations>=1.4.6" comet pycocotools
|
RUN pip install -e ".[export]" tensorrt-cu12 "albumentations>=1.4.6" comet pycocotools
|
||||||
|
|
||||||
# Run exports to AutoInstall packages
|
# Run exports to AutoInstall packages
|
||||||
# Edge TPU export fails the first time so is run twice here
|
# Edge TPU export fails the first time so is run twice here
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
__version__ = "8.3.18"
|
__version__ = "8.3.19"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -691,10 +691,10 @@ class Exporter:
|
||||||
import tensorrt as trt # noqa
|
import tensorrt as trt # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if LINUX:
|
if LINUX:
|
||||||
check_requirements("tensorrt>7.0.0,<=10.1.0")
|
check_requirements("tensorrt>7.0.0,!=10.1.0")
|
||||||
import tensorrt as trt # noqa
|
import tensorrt as trt # noqa
|
||||||
check_version(trt.__version__, ">=7.0.0", hard=True)
|
check_version(trt.__version__, ">=7.0.0", hard=True)
|
||||||
check_version(trt.__version__, "<=10.1.0", msg="https://github.com/ultralytics/ultralytics/pull/14239")
|
check_version(trt.__version__, "!=10.1.0", msg="https://github.com/ultralytics/ultralytics/pull/14239")
|
||||||
|
|
||||||
# Setup and checks
|
# Setup and checks
|
||||||
LOGGER.info(f"\n{prefix} starting export with TensorRT {trt.__version__}...")
|
LOGGER.info(f"\n{prefix} starting export with TensorRT {trt.__version__}...")
|
||||||
|
|
|
||||||
|
|
@ -226,10 +226,10 @@ class AutoBackend(nn.Module):
|
||||||
import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download
|
import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if LINUX:
|
if LINUX:
|
||||||
check_requirements("tensorrt>7.0.0,<=10.1.0")
|
check_requirements("tensorrt>7.0.0,!=10.1.0")
|
||||||
import tensorrt as trt # noqa
|
import tensorrt as trt # noqa
|
||||||
check_version(trt.__version__, ">=7.0.0", hard=True)
|
check_version(trt.__version__, ">=7.0.0", hard=True)
|
||||||
check_version(trt.__version__, "<=10.1.0", msg="https://github.com/ultralytics/ultralytics/pull/14239")
|
check_version(trt.__version__, "!=10.1.0", msg="https://github.com/ultralytics/ultralytics/pull/14239")
|
||||||
if device.type == "cpu":
|
if device.type == "cpu":
|
||||||
device = torch.device("cuda:0")
|
device = torch.device("cuda:0")
|
||||||
Binding = namedtuple("Binding", ("name", "dtype", "shape", "data", "ptr"))
|
Binding = namedtuple("Binding", ("name", "dtype", "shape", "data", "ptr"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue