Skip to content

How to assign a different GPU? #60

@TangYiChing

Description

@TangYiChing

Hi,

Due to the GPU-Out-Of-Memory problem, I have to change the default "cuda:0" to another empty GPU,
Here's what I did to set the GPU device by changing cuda:0 to cuda:1:

vim igfold/IgFoldRunner.py 

device = torch.device(
"cuda:0" if torch.cuda.is_available() and try_gpu else "cpu")  
print(f"Using device: {device}")

However, I got this error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)

Can you tell me how to assign a GPU appropriately?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions