Skip to content

Conversation

@AlongWY
Copy link
Contributor

@AlongWY AlongWY commented Mar 22, 2025

  • Fix pre-compile on cpu-only machines

return self._communication_backend_name

def is_triton_supported(self):
if not torch.cuda.is_available():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not torch.cuda.is_available():
if not self.is_available():

@tjruwase
Copy link
Contributor

@AlongWY, thanks for the PR. Can you please share the motivation to help us understand your use case?

@AlongWY
Copy link
Contributor Author

AlongWY commented Mar 27, 2025

@AlongWY, thanks for the PR. Can you please share the motivation to help us understand your use case?

I used GitHub Actions to precompile DeepSpeed, but after upgrading to v0.16.4, the precompilation failed. The repository is here: https://github.com/AlongWY/deepspeed_wheels

And the compile result here show that tranformer inference is not support cuda 12.6, which is also shown in #6709.

@loadams
Copy link
Collaborator

loadams commented Mar 27, 2025

@AlongWY, thanks for the PR. Can you please share the motivation to help us understand your use case?

I used GitHub Actions to precompile DeepSpeed, but after upgrading to v0.16.4, the precompilation failed. The repository is here: https://github.com/AlongWY/deepspeed_wheels

And the compile result here show that tranformer inference is not support cuda 12.6, which is also shown in #6709.

@AlongWY - just so I follow, you're compiling in a GitHub action that has cuda installed but no GPU (so that's why you are hitting the CPU only path here) but with DS_ACCELERATOR=cuda? Just wanted to make sure I understood the repo correctly?

Also the error you shared is only on Windows (that we've observed) but your action appears to be running on Ubuntu, is that right?

@AlongWY
Copy link
Contributor Author

AlongWY commented Mar 28, 2025

Yes, the GitHub Action is compiling in an Ubuntu environment with CUDA installed but without a GPU.
The GitHub Action runs only on Ubuntu, but the error still occurs.

@loadams
Copy link
Collaborator

loadams commented Mar 28, 2025

Yes, the GitHub Action is compiling in an Ubuntu environment with CUDA installed but without a GPU. The GitHub Action runs only on Ubuntu, but the error still occurs.

Thanks @AlongWY - can you share the error that you were seeing in this environment? Also if you have triton installed in the environment or not?

@AlongWY
Copy link
Contributor Author

AlongWY commented Mar 31, 2025

Yes, the triton has been installed in the environment.

Error for triton

image

Error for type

image

@AlongWY
Copy link
Contributor Author

AlongWY commented Jul 23, 2025

Any update?

@sfc-gh-truwase
Copy link
Collaborator

sfc-gh-truwase commented Aug 11, 2025

Any update?

@AlongWY apologies for the delay. This overall looks good to me. I will appreciate a couple more clarifications.

  1. I am curious why accelerator detection logic is incorrectly identifying as cuda env.. Or are you hardcoding DS_ACCELERATOR=cuda` in your code?
  2. Are you aligned with the suggested code change?

@AlongWY
Copy link
Contributor Author

AlongWY commented Aug 12, 2025

@sfc-gh-truwase Hi, i have update the code.

For the two questions:

  1. I use GitHub Actions to automatically build wheel packages for different environments, so I manually set the environment variable DS_ACCELERATOR=cuda.
  2. I have aligned with the suggested code change.

@sfc-gh-truwase sfc-gh-truwase merged commit 8aadf6c into deepspeedai:master Aug 12, 2025
13 checks passed
@AlongWY AlongWY deleted the patch-1 branch August 13, 2025 07:32
LYMDLUT pushed a commit to LYMDLUT/DeepSpeed that referenced this pull request Aug 20, 2025
+ Fix pre-compile on cpu-only machines

---------

Co-authored-by: Logan Adams <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
Signed-off-by: lym <[email protected]>
mauryaavinash95 pushed a commit to DataStates/DeepSpeed that referenced this pull request Oct 4, 2025
+ Fix pre-compile on cpu-only machines

---------

Co-authored-by: Logan Adams <[email protected]>
Co-authored-by: Olatunji Ruwase <[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.

4 participants