Skip to content

Conversation

@jagadish-amd
Copy link
Contributor

@jagadish-amd jagadish-amd commented Oct 15, 2024

The commit is needed to avoid GPU 0 being set as the compute stream via torch.cuda.current_stream() during initialization across all GPUs.
The perf RunningAvgSamplesPerSec metrics improves on a multi gpu node, tested on AMD GPU with ROCm stack.
As number of GPUs increases; without this commit, GPU 0 takes in more load compared to other GPUs.

The commit is needed to avoid GPU 0 being set as the
compute stream via torch.cuda.current_stream() during initialization
across all GPUs.

Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
@jagadish-amd
Copy link
Contributor Author

ping @jeffdaily

Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
@jagadish-amd
Copy link
Contributor Author

jagadish-amd commented Oct 17, 2024

@tjruwase can you please review / merge ?

@tjruwase
Copy link
Contributor

@tjruwase can you please review / merge ?

@jagadish-amd, apologies for the delay. Done.

@tjruwase tjruwase merged commit 130fb58 into deepspeedai:master Oct 29, 2024
1 check passed
@jagadish-amd jagadish-amd deleted the cifar-set_device branch October 29, 2024 18:20
hwchen2017 pushed a commit that referenced this pull request Jun 8, 2025
…uted backend. (#931)

* Set cuda device during initialization of distributed backend.

The commit is needed to avoid GPU 0 being set as the
compute stream via torch.cuda.current_stream() during initialization
across all GPUs.

Signed-off-by: Jagadish Krishnamoorthy <[email protected]>

* Use device-agnostic accelerator API.

Signed-off-by: Jagadish Krishnamoorthy <[email protected]>

---------

Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
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.

3 participants