Open dmagee opened 2 months ago
I think building from source requires torch
to be installed in advance as I see:
ModuleNotFoundError: No module named 'torch'
Have you had a chance to try installing torch
first before building pyg-lib
?
Torch is installed !!!
"Note: I have pytorch installed in this conda virtual environment:"
torch 2.1.2
After a bit of googling I think the issue is pip creates a new virtual environment in /tmp with just the specified dependencies, rather than using the selected virtual environment (unless the --no-build-isolation option is used). Unfortunately when using the --no-build-isolation option the fix for cuda headers location (--config-settings="INCLUDE=/actual/path/to/python/cuda/include") no longer works and it fails with error:
cc1plus: fatal error: cuda_runtime.h: No such file or directory
Thus I think there are two issues here:
1) pyg-lib isn't specifying torch as a dependency and so it's not included in the virtual environment created in /tmp
2) The build expects cuda headers to be in (or at least this is the only Include directory used by gcc in the build):
path-to_my_virtual_environment/bin/../targets/ppc64le-linux/include i.e path-to_my_virtual_environment/targets/ppc64le-linux/include
Which doesn't exist. The header in question is actually in:
path-to_my_virtual_environment/pkgs/cuda-toolkit/targets/ppc64le-linux/include
Cuda was installed into the virtual environment via pip:
pip install cuda-python==12.2
Any thoughts on fixing either of these issues?
šµ Describe the installation problem
Building from the master on powerpc64 Iget the following error from:
Note: I have pytorch installed in this conda virtual environment:
Environment
pyg-lib
version: Masterpyg-lib
(conda
,pip
, source): conda install -y pytorchI had to use option: --config-settings="INCLUDE=/path/to/python/cuda/include" as default include used was not where cuda was installed. Cuda was installed by "pip install cuda-python==12.2"