Link error when using code from the gnn project
ThomasVille opened this issue · comments
Thomas Ville commented
When compiling tsd.scatter_cuda with the following setup code:
if CUDA_HOME is not None:
ext_modules += [
CUDAExtension('tsd.scatter_cuda',
['cuda/scatter.cpp', 'cuda/scatter_kernel.cu', 'cuda/gnn_kernel.cu', 'cuda/gnn_kernel.cpp'])
]
and with gnn_kernel.cu
containing the C++ classes to run the aggregation with CUDA, I get the following error when using the module:
Traceback (most recent call last):
File "test/test_hag.py", line 1, in <module>
from tsd.hag import graph_to_hag
File "/home/thomas/Documents/tsd/tsd/__init__.py", line 3, in <module>
from .mul import scatter_mul
File "/home/thomas/Documents/tsd/tsd/mul.py", line 3, in <module>
from tsd.utils.ext import get_func
File "/home/thomas/Documents/tsd/tsd/utils/ext.py", line 5, in <module>
import tsd.scatter_cuda
ImportError: /home/thomas/Documents/tsd/tsd/scatter_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN8GNNLayerC1EP8GNNModelPfS2_iii7ActMode7AggMode