Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented May 5, 2025

since we support HPU and ROCm for inference, we need to gate torch.cuda.device_count since on HPU specificially this will cause issues.

use similar logic as we do in init.py to ensure CUDA is available, and HPU/ROCm are not.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Functional tests have been added, if necessary.
  • E2E Workflow tests have been added, if necessary.

This is an automatic backport of pull request #3358 done by [Mergify](https://mergify.com).

since we support HPU and ROCm for inference, we need to gate torch.cuda.device_count since on HPU specificially this will cause issues.

use similar logic as we do in `init.py` to ensure CUDA is available, and HPU/ROCm are not.

Signed-off-by: Charlie Doern <[email protected]>
(cherry picked from commit 9b05e24)
@mergify mergify bot added the release-branch Pull Request directly to a release branch label May 5, 2025
@mergify mergify bot added the one-approval PR has one approval from a maintainer label May 5, 2025
@mergify mergify bot added ci-failure PR has at least one CI failure and removed one-approval PR has one approval from a maintainer ci-failure PR has at least one CI failure labels May 5, 2025
@mergify mergify bot merged commit 1be4761 into release-v0.26 May 5, 2025
27 checks passed
@mergify mergify bot deleted the mergify/bp/release-v0.26/pr-3358 branch May 5, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-branch Pull Request directly to a release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants