Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading of YOLOv8 sparse models on CPUs #1637

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

anmarques
Copy link
Member

Small change to load models initially into CPUs. The model is transferred to GPU if needed later. Without this change the model failed to load on CPU-only systems.

Test plan:

  1. I made sure that I could load the model in CPU-only machines and export to onnx, which motivated this fix.
  2. In a GPU system I evaluated a dense model (zoo:cv/detection/yolov8-s/pytorch/ultralytics/coco/base-none) and made sure GPUs were used as expected
  3. In a GPU system I evaluated a sparse model (zoo:cv/detection/yolov8-s/pytorch/ultralytics/coco/pruned50_quant-none) and made sure GPUs were used as expected
  4. In a GPU system I ran a training command for a sparse model (zoo:cv/detection/yolov8-s/pytorch/ultralytics/coco/pruned50_quant-none) and made sure GPUs were used as expected
  5. In a GPU system I exported a sparse model to onnx (zoo:cv/detection/yolov8-s/pytorch/ultralytics/coco/pruned50_quant-none)

@anmarques anmarques merged commit 0b64b31 into main Jun 23, 2023
10 checks passed
@anmarques anmarques deleted the fix/yolov8/model_loading_cpu branch June 23, 2023 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants