Skip to content

Force CPU if CUDA is not available#216

Open
kavindamihiran wants to merge 1 commit intocaiyuanhao1998:masterfrom
kavindamihiran:master
Open

Force CPU if CUDA is not available#216
kavindamihiran wants to merge 1 commit intocaiyuanhao1998:masterfrom
kavindamihiran:master

Conversation

@kavindamihiran
Copy link

@kavindamihiran kavindamihiran commented Nov 5, 2025

Updated device assignment logic to check for CUDA availability.
Even if the user wants GPUs, the system needs to have CUDA support

opt['num_gpu'] != 0 and torch.cuda.is_available()
Both conditions must be True to use CUDA. If either is False, the code falls back to CPU

Updated device assignment logic to check for CUDA availability.
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.

1 participant