DiffPack icon indicating copy to clipboard operation
DiffPack copied to clipboard

CUDA index out of bounds

Open BL-Lac149597870 opened this issue 2 years ago • 4 comments

When I executed the 'inference.py' script, I encountered a CUDA error. The error message is displayed in the following image:

image

This error occurred immediately after the script completed executing line 121 and began processing line 24. Any ideas for this bug?

BL-Lac149597870 avatar Nov 18 '23 06:11 BL-Lac149597870

Hi @BL-Lac149597870, this error seems to indicate the it is attempting to access an element of a tensor or array at an index that does not exist. Have you checked the the maximum value of protein.atom2graph and the shape of sigma?

zytzrh avatar Dec 24 '23 02:12 zytzrh

The error occured before the script executing line 124. It appears there may be an issue with the graph_construction_model. Removing the SpatialEdge and KNNEdge classes from the train.yaml file resolves the previously mentioned error. image

BL-Lac149597870 avatar Dec 25 '23 14:12 BL-Lac149597870

Hi @BL-Lac149597870, can you locate which pdb cause this issue and share the file?

zytzrh avatar Dec 28 '23 09:12 zytzrh

Hi @zytzrh ,I've reviewed the source code of TorchDrug and noticed an issue related to the computation of the explicit_valence property. This can be found in the TorchDrug repository here: https://github.com/DeepGraphLearning/torchdrug/blob/6066fbd82360abb5f270cba1eca560af01b8cc90/torchdrug/data/molecule.py#L511C5-L514C47. It's important to note that this doesn't affect the operation of DiffPack. Regarding the graph construction in DiffPack, observed here:https://github.com/DeepGraphLearning/DiffPack/blob/81ee51612abfab5af23a8d33fbb081a024f83a1c/diffpack/task.py#L116C1-L121C61 , it appears that additional edge types are incorporated into the edge_list . However, bond2valence lacks corresponding values for these new edge types.

BL-Lac149597870 avatar Jan 18 '24 02:01 BL-Lac149597870