-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[core][refactor] Move accelerator-specific environment variables to ray_constants.py
to avoid redefining them
#51026
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
import ray._private.ray_constants as ray_constants | ||
from ray._private.ray_constants import env_bool | ||
from ray._private.accelerators.nvidia_gpu import CUDA_VISIBLE_DEVICES_ENV_VAR | ||
from ray.train import BackendConfig | ||
from ray.train.constants import ENABLE_SHARE_CUDA_VISIBLE_DEVICES_ENV | ||
from ray.train.v2._internal.execution.callback import WorkerGroupCallback | ||
|
@@ -63,7 +64,7 @@ def _share_cuda_visible_devices(worker_group: WorkerGroup): | |
- Worker2: "0,1" | ||
""" | ||
_share_accelerator_ids( | ||
worker_group, ray_constants.GPU, ray_constants.CUDA_VISIBLE_DEVICES_ENV_VAR | ||
worker_group, ray_constants.GPU, CUDA_VISIBLE_DEVICES_ENV_VAR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justinvyu PTAL for codeowner approval, and also can you help me understand why we depend on this env var directly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to basically overwrite the Ray Core behavior of restricting |
||
) | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as
ASCEND_RT_VISIBLE_DEVICES_ENV_VAR
.