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

Empty val batch CUDA device fix #7539

Merged
merged 1 commit into from
Apr 22, 2022
Merged

Empty val batch CUDA device fix #7539

merged 1 commit into from
Apr 22, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 22, 2022

Verified fix for #7525 (comment)

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved device consistency in validation code.

πŸ“Š Key Changes

  • Ensured tensors are initialized on the correct device during validation.

🎯 Purpose & Impact

  • πŸ› οΈ Purpose: To avoid errors that occur when tensors are created on a different device than the model (e.g., model on GPU but tensor on CPU).
  • πŸ’» Impact: Provides more stable and consistent code execution, especially for those using different compute devices (GPUs and CPUs).
  • 🌐 Benefits users by reducing potential device mismatch bugs and enhancing the overall experience with smoother validation processes.

@glenn-jocher glenn-jocher self-assigned this Apr 22, 2022
@glenn-jocher glenn-jocher merged commit 813eba8 into master Apr 22, 2022
@glenn-jocher glenn-jocher deleted the fix/val branch April 22, 2022 19:01
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
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

1 participant