-
Notifications
You must be signed in to change notification settings - Fork 3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find DGL C++ sparse library #6004
Comments
You can try DGL 1.1.1, which is compatible with Pytorch 2.0.1. |
Thanks! Can we keep the issue open until the package is fixed or is this a |
Also We are really close to getting |
I think we would not fix this issue in a short time. Basically we only support one minor version for each Pytorch major version. |
Sounds good, thanks! |
I'm still getting this issue with DGL 1.1.2 and torch 2.1.1 $ python
Python 3.11.5 (main, Sep 11 2023, 13:23:44) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dgl import graph
>>> g = graph(([0, 1, 2], [1, 2, 3]))
>>> g.adj()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/carlin/anaconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/heterograph.py", line 3821, in adj
from .sparse import spmatrix
File "/home/carlin/anaconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/sparse/__init__.py", line 43, in <module>
load_dgl_sparse()
File "/home/carlin/anaconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/sparse/__init__.py", line 35, in load_dgl_sparse
raise FileNotFoundError(f"Cannot find DGL C++ sparse library at {path}")
FileNotFoundError: Cannot find DGL C++ sparse library at /home/carlin/anaconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/dgl_sparse/libdgl_sparse_pytorch_2.1.1.so
$ conda list | grep -e 'dgl' -e 'torch'
dgl 1.1.2.cu118 py311_0 dglteam/label/cu118
ffmpeg 4.3 hf484d3e_0 pytorch
libjpeg-turbo 2.0.0 h9bf148f_0 pytorch
pyg 2.4.0 py311_torch_2.1.0_cu118 pyg
pytorch 2.1.1 py3.11_cuda11.8_cudnn8.7.0_0 pytorch
pytorch-cuda 11.8 h8dd9ede_2 pytorch
pytorch-mutex 1.0 cuda pytorch
torchtriton 2.1.0 py311 pytorch
torchvision 0.15.2 cuda118py311h4cc2eb7_0
|
@CarlinLiao what is the output of:
|
This is from another machine that I've been using with SPT with a slightly different environment (Linux native instead of WSL, Python 3.11.0 instead of 3.11.5), but I was able to replicate the issue. It looks like I have libdgl_spare for torch 2.0.0 and 2.0.1 but not 2.1.1. $ python
Python 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:27:40) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dgl import graph
>>> g = graph(([0, 1, 2], [1, 2, 3]))
>>> g.adj()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/liaoc2/miniconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/heterograph.py", line 3821, in adj
from .sparse import spmatrix
File "/home/liaoc2/miniconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/sparse/__init__.py", line 43, in <module>
load_dgl_sparse()
File "/home/liaoc2/miniconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/sparse/__init__.py", line 35, in load_dgl_sparse
raise FileNotFoundError(f"Cannot find DGL C++ sparse library at {path}")
FileNotFoundError: Cannot find DGL C++ sparse library at /home/liaoc2/miniconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/dgl_sparse/libdgl_sparse_pytorch_2.1.1.so
>>> exit()
$ conda list | grep -e 'dgl' -e 'torch'
dgl 1.1.2.cu118 py311_0 dglteam/label/cu118
pytorch 2.1.1 py3.11_cuda11.8_cudnn8.7.0_0 pytorch
pytorch-cuda 11.8 h7e8668a_5 pytorch
pytorch-mutex 1.0 cuda pytorch
torchtriton 2.1.0 py311 pytorch
$ ls -l /home/liaoc2/miniconda3/envs/spt_cggnn/lib/python3.11/site-packages/dgl/dgl_sparse/
total 1752
-rwxrwxr-x 2 liaoc2 liaoc2 894033 Aug 14 04:36 libdgl_sparse_pytorch_2.0.0.so
-rwxrwxr-x 2 liaoc2 liaoc2 894033 Aug 14 04:36 libdgl_sparse_pytorch_2.0.1.so |
Hi @mikemhenry and @CarlinLiao, DGL sparse isn't compatible with Pytorch 2.1.1 for now. Could you try 2.0.x? In fact, for every version update of Pytorch, DGL needs to trigger a corresponding update. |
🐛 Bug
It looks like the logic of
dgl/sparse/__init__.py
needs to be updated iflibdgl_sparse_pytorch_2.0.0.so
is ABI compatible withpytorch 2.0.1
orlibdgl_sparse_pytorch
needs to be rebuilt withpytorch 2.0.1
or thedgl
package needs arun_constrained
update to indicate it won't work with newer versions of pytorch. These are all thelibdgl_sparse_pytorch
libs being shipped right nowTo Reproduce
Expected behavior
Environment
conda
,pip
, source): condaAdditional context
The text was updated successfully, but these errors were encountered: