pypi ultralytics 8.3.253
v8.3.253 - `ultralytics 8.3.253` Add support to select Vulkan device when using NCNN (#23164)

5 hours ago

🌟 Summary (single-line synopsis)

Ultralytics 8.3.253 adds explicit Vulkan GPU device selection for NCNN inference (plus safer PaddlePaddle/NCNN dependency handling) to improve cross-vendor GPU acceleration and reliability ⚡🖥️🛠️

📊 Key Changes

  • NCNN + Vulkan device targeting (main feature) ⚡
    • You can now pass a device string like device="vulkan:0" or device="vulkan:1" to choose which Vulkan-capable GPU NCNN uses (helpful on AMD/Intel/non-NVIDIA systems and multi-GPU setups).
    • select_device() now accepts "vulkan..." device strings and leaves them unchanged so they flow cleanly into inference setup.
    • NCNN backend (ultralytics/nn/autobackend.py) now:
      • enables Vulkan compute when device starts with "vulkan",
      • calls net.set_vulkan_device(<id>),
      • then sets device=torch.device("cpu") to keep the rest of the pipeline consistent (NCNN handles the GPU work internally).
  • Docs update for Vulkan acceleration 📚
    • The NCNN integration guide now explicitly documents Vulkan GPU acceleration and shows Python/CLI examples for device=vulkan:<id>.
  • More robust dependency guardrails 🧩
    • Excludes PaddlePaddle 3.3.0 (!=3.3.0) in both export and inference paths due to an upstream breakage 🛑.
    • ARM64 NCNN installs from Git source instead of PyPI (PyPI packages are currently broken), improving install success on ARM devices (e.g., Raspberry Pi) 🧱.

🎯 Purpose & Impact

  • Better performance options on non-NVIDIA GPUs 🚀
    • Vulkan selection unlocks GPU-accelerated NCNN inference on AMD/Intel and other Vulkan-supported hardware—great for desktops and edge devices where CUDA isn’t available.
  • Multi-GPU control and predictability 🎛️
    • Users with multiple Vulkan devices can reliably choose which GPU runs inference, reducing surprises and improving resource management.
  • Smoother installs and fewer “mysterious failures” ✅
    • The PaddlePaddle version exclusion and ARM64 NCNN source install reduce breakages caused by known-bad upstream releases.

Example usage (NCNN model with Vulkan):

from ultralytics import YOLO

model = YOLO("yolo11n_ncnn_model")
results = model("image.jpg", device="vulkan:0")  # pick Vulkan GPU 0

What's Changed

  • NCNN source build and Paddle 3.3.0 exclusions by @glenn-jocher in #23173
  • ultralytics 8.3.253 Add support to select Vulkan device when using NCNN by @Faerbit in #23164

New Contributors

Full Changelog: v8.3.252...v8.3.253

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.