Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Cannot build extensions when no gpu device exists #5534

Open
ccoulombe opened this issue Mar 28, 2024 · 0 comments 路 May be fixed by #5535
Open

[BUG]: Cannot build extensions when no gpu device exists #5534

ccoulombe opened this issue Mar 28, 2024 · 0 comments 路 May be fixed by #5535
Labels
bug Something isn't working

Comments

@ccoulombe
Copy link

馃悰 Describe the bug

When no GPU device exists, such as CI or build nodes, no extensions can be built since torch.cuda.is_available checks for a device and not if cuda is actually available.

Cuda libraries are available on such nodes.

This is caused by

cuda_available = torch.cuda.is_available()

Solution : use an environment variable FORCE_CUDA which is a common case, to enable such build.

Environment

Linux with Cuda available, but no GPU device.

@ccoulombe ccoulombe added the bug Something isn't working label Mar 28, 2024
@ccoulombe ccoulombe linked a pull request Mar 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant