I have Pytorch 1.8.1 installed (this very version is needed).
Next I have downloaded pytorch_scatter repo (version 2.1.0) from github and installed it like this:
pip install -e pytorch_scatter
After install succeeds, I can verify pytorch_scatter have been installed:
pip list | grep torch-scatter
torch-scatter 2.1.0 /home/arseniy.marin@nami.local/Projects/FSDv2/pytorch_scatter
Now I want:
Use pytorch_scatter functionality from Python (I already can use it)
Use pytorch_scatter functinality from C++
I want to use existing C++ build from pytorch_scatter/build, which was created by "pip install", specifically scatter_cuda(..) function. This function seems to have been compiled in pytorch_scatter/build/lib.linux-x86_64-3.8/torch_scatter/_scatter_cuda.so. So I add the next lines to CMakeLists.txt:
I have Pytorch 1.8.1 installed (this very version is needed). Next I have downloaded pytorch_scatter repo (version 2.1.0) from github and installed it like this:
pip install -e pytorch_scatter
After install succeeds, I can verify pytorch_scatter have been installed:
Now I want:
I want to use existing C++ build from pytorch_scatter/build, which was created by "pip install", specifically scatter_cuda(..) function. This function seems to have been compiled in pytorch_scatter/build/lib.linux-x86_64-3.8/torch_scatter/_scatter_cuda.so. So I add the next lines to CMakeLists.txt:
test_cpp builds successfully, but fails in runtime:
error while loading shared libraries: libc10_cuda.so: cannot open shared object file: No such file or directory
I can locate libc10_cuda.so in Pytorch installation:
So how do I have to configure my C++ build properly? This is full CMakeLists.txt: