From 9bc6610d3554d07c0a27a9104cd3e6ef49359218 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Wed, 19 Feb 2025 18:27:16 -0800 Subject: [PATCH 1/2] fix an outdated doc wrt CUDA_VISIBLE_DEVICES Signed-off-by: Stas Bekman --- docs/_tutorials/getting-started.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/_tutorials/getting-started.md b/docs/_tutorials/getting-started.md index 36dcdf41d9d0..3975fbd8baff 100644 --- a/docs/_tutorials/getting-started.md +++ b/docs/_tutorials/getting-started.md @@ -316,10 +316,14 @@ local machine to discover the number of slots available. The `--include` and `--exclude` arguments work as normal, but the user should specify 'localhost' as the hostname. -Also note that `CUDA_VISIBLE_DEVICES` can't be used with DeepSpeed to control -which devices should be used. For example, to use only gpu1 of the current -node, do: +Also note that `CUDA_VISIBLE_DEVICES` can be used with `deepspeed` to control +which devices should be used on a single node. So either of these would work +to launch just on device 0+1 of the current node: ```bash -deepspeed --include localhost:1 ... +deepspeed --include localhost:0,1 ... +``` + +```bash +CUDA_VISIBLE_DEVICES=0,1 deepspeed ... ``` From 4b11f65fae0a2440f6e9aa63fe4255488bbd19ca Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Wed, 19 Feb 2025 18:28:39 -0800 Subject: [PATCH 2/2] improve Signed-off-by: Stas Bekman --- docs/_tutorials/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_tutorials/getting-started.md b/docs/_tutorials/getting-started.md index 3975fbd8baff..2c6e27d1319d 100644 --- a/docs/_tutorials/getting-started.md +++ b/docs/_tutorials/getting-started.md @@ -318,7 +318,7 @@ as the hostname. Also note that `CUDA_VISIBLE_DEVICES` can be used with `deepspeed` to control which devices should be used on a single node. So either of these would work -to launch just on device 0+1 of the current node: +to launch just on devices 0 and 1 of the current node: ```bash deepspeed --include localhost:0,1 ...