Skip to content

Empty val batch CUDA device fix#7539

Merged
glenn-jocher merged 1 commit intomasterfrom
fix/val
Apr 22, 2022
Merged

Empty val batch CUDA device fix#7539
glenn-jocher merged 1 commit intomasterfrom
fix/val

Conversation

@glenn-jocher
Copy link
Copy Markdown
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.

1 participant