gcorso / DiffDock

Implementation of DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking
https://arxiv.org/abs/2210.01776
MIT License
976 stars 238 forks source link

Executes but quickly leads to "Expected all tensors to be on the same device" #196

Closed wwchen256 closed 3 months ago

wwchen256 commented 3 months ago

Hi, I prepared a pdb for protein and one for ligand. Libraries are all installed including Nvidia drivers on A100 40GB. The following is the error message which is saying tensors are split on cuda:0 and cpu.

DiffDock will run on cuda Generating ESM language model embeddings Processing 1 of 1 batches (1 sequences) HAPPENING | confidence model uses different type of graphs than the score model. Loading (or creating if not existing) the data for the confidence model now. /home/xxx/anaconda3/envs/diffdock/lib/python3.9/site-packages/torch/jit/_check.py:181: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in __init__. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in torch.jit.Attribute. warnings.warn("The TorchScript type system doesn't support " Size of test dataset: 1 0it [00:00, ?it/s]@> 2310 atoms and 1 coordinate set(s) were parsed in 0.02s. @> 2310 atoms and 1 coordinate set(s) were parsed in 0.02s. Failed on ['complex1'] Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! 1it [00:00, 1.49it/s] Failed for 1 complexes Skipped 0 complexes Results are in ./4wkq/output

wwchen256 commented 3 months ago

Removing system CUDA and installing CUDA 11.7 plus its default Nvidia driver solves this error.