Fix ray import error when both ROCR_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES are set#53757
Merged
jjyao merged 3 commits intoray-project:masterfrom Jun 20, 2025
Merged
Fix ray import error when both ROCR_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES are set#53757jjyao merged 3 commits intoray-project:masterfrom
jjyao merged 3 commits intoray-project:masterfrom
Conversation
…EVICES are set Signed-off-by: 2niuhe <carlton2tang@gmail.com>
Contributor
|
@2niuhe This looks good. The runtime error was added to mitigate an issue with Pytorch which has been resolved by pytorch/pytorch#144026. cc: @jjyao @kevin85421 |
kevin85421
approved these changes
Jun 18, 2025
Member
|
@2niuhe please ping me when all CI tests pass. |
Contributor
|
@vickytsang for review |
Contributor
Author
|
@kevin85421 All CI tests have passed. Please review. |
Signed-off-by: niu_he <carlton2tang@gmail.com>
Signed-off-by: niu_he <carlton2tang@gmail.com>
minerharry
pushed a commit
to minerharry/ray
that referenced
this pull request
Jun 27, 2025
…SIBLE_DEVICES are set (ray-project#53757) Signed-off-by: 2niuhe <carlton2tang@gmail.com> Signed-off-by: niu_he <carlton2tang@gmail.com>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 2, 2025
…SIBLE_DEVICES are set (#53757) Signed-off-by: 2niuhe <carlton2tang@gmail.com> Signed-off-by: niu_he <carlton2tang@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
When both ROCR_VISIBLE_DEVICES=0 and HIP_VISIBLE_DEVICES=0 are set (as default settings added to .bashrc during ROCm installation), importing ray in Python 3.11.12 results in a RuntimeError indicating that HIP_VISIBLE_DEVICES should be used instead of ROCR_VISIBLE_DEVICES.
Expected Behavior:
Ray should ignore ROCR_VISIBLE_DEVICES if HIP_VISIBLE_DEVICES is set
Related issue number
#53737
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.