ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50k stars 16.16k forks source link

Training with HIP/ROCm #13176

Open JijaProGamer opened 2 months ago

JijaProGamer commented 2 months ago

Search before asking

Description

As pytorch 2.3 seems to support ROC https://pytorch.org/docs/stable/notes/hip.html

With minimal code changes (only TF32 support is not present, but it uses the same cuda device as before), there should be a way to set up ultralytics to work with a amd gpu on Linux, especially when the changes should be minimal.

Use case

And GPUs are 2-3x cheaper and have 2-3x more VRAM than their Nvidia counterparts, the only thing holding them back is the ROCm support in ultralytics.

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 2 months ago

👋 Hello @JijaProGamer, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Requirements

Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

Introducing YOLOv8 🚀

We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀!

Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.

Check out our YOLOv8 Docs for details and get started with:

pip install ultralytics
glenn-jocher commented 2 months ago

Hello,

Thank you for your detailed suggestion regarding ROCm support for AMD GPUs in YOLOv5. We appreciate your proactive approach and the potential benefits this could bring to the community.

To address your points:

  1. Minimal Code Changes: It's encouraging to hear that the required changes might be minimal. If you have any specific code snippets or modifications in mind, feel free to share them. This would help us understand the scope and feasibility of integrating ROCm support.

  2. Testing with Latest Versions: Please ensure you are using the latest versions of PyTorch and YOLOv5. This helps us confirm that any issues or limitations are not due to outdated software. You can update YOLOv5 with:

    git pull

    And update PyTorch following the instructions on PyTorch's official site.

  3. Reproducible Example: If you encounter any issues while attempting to integrate ROCm, please provide a minimum reproducible code example. This will allow us to investigate and address any potential bugs more effectively. You can refer to our guide on creating a minimum reproducible example here.

  4. Community Contributions: We welcome contributions from the community. If you are willing to submit a PR, that would be fantastic! Your efforts could significantly accelerate the integration of ROCm support. Please ensure your PR is well-documented and tested.

Feel free to share any additional insights or questions you might have. We're here to help and look forward to potentially collaborating on this enhancement.

github-actions[bot] commented 1 month ago

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐