dgl
dgl copied to clipboard
GraphBolt
When I using the new feature GraphBolt. I meet this question: can't find c++ library graphbolt This is my environment: pytorch(2.2 + cu118)
Hi, could you please follow the bug report template to provide more information? Such as your DGL version, install methods, OS, etc?
I replace my pytorch version with 2.1and it worked. Thank you
发自我的iPhone
------------------ Original ------------------ From: Minjie Wang @.> Date: Thu,Feb 29,2024 9:52 AM To: dmlc/dgl @.> Cc: twdream @.>, Author @.> Subject: Re: [dmlc/dgl] GraphBolt (Issue #7157)
Hi, could you please follow the bug report template to provide more information? Such as your DGL version, install methods, OS, etc?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you
Hi, @a1941409241 @jermainewang I find the reason. This issue is due to the libgraphbolt_pytorch_2.2.2.so
file does not exist at all. Could you developers add the newest .so
files to the dgl library?
If not, you can just change your version of libgraphbolt_pytorch in the dgl/graphbolt/__init__.py
, like what I have done in the following:
def load_graphbolt():
"""Load Graphbolt C++ library"""
vers = torch.__version__.split("+", maxsplit=1)[0]
if sys.platform.startswith("linux"):
basename = f"libgraphbolt_pytorch_2.2.1.so"
elif sys.platform.startswith("darwin"):
basename = f"libgraphbolt_pytorch_{vers}.dylib"
elif sys.platform.startswith("win"):
basename = f"graphbolt_pytorch_{vers}.dll"
else:
raise NotImplementedError("Unsupported system: %s" % sys.platform)
dirname = os.path.dirname(libinfo.find_lib_path()[0])
path = os.path.join(dirname, "graphbolt", basename)
if not os.path.exists(path):
raise FileNotFoundError(
f"Cannot find DGL C++ graphbolt library at {path}"
)
try:
torch.classes.load_library(path)
except Exception: # pylint: disable=W0703
raise ImportError("Cannot load Graphbolt C++ library")
This can fix your error.
Hi, @a1941409241 @jermainewang I find the reason. This issue is due to the
libgraphbolt_pytorch_2.2.2.so
file does not exist at all. Could you developers add the newest.so
files to the dgl library? If not, you can just change your version of libgraphbolt_pytorch in thedgl/graphbolt/__init__.py
, like what I have done in the following:
Is this solution safe? It is basically mixing GraphBolt compiled for an older torch version with a newer torch installation.
Hi, @a1941409241 @jermainewang I find the reason. This issue is due to the
libgraphbolt_pytorch_2.2.2.so
file does not exist at all. Could you developers add the newest.so
files to the dgl library? If not, you can just change your version of libgraphbolt_pytorch in thedgl/graphbolt/__init__.py
, like what I have done in the following:Is this solution safe? It is basically mixing GraphBolt compiled for an older torch version with a newer torch installation.
I guess changing the version is just an expedient solution. Of course it works.
We will release a DGL 2.2 which supports Pytorch 2.2.2 and 2.3 in early May.
This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you