Compilation C++ extension using recentpytorch version and cuda (1.20 and 10.1)

Good evening,

I needed to upgrade pytorch to use a new function implemented since 1.0. However my C++ extension for pointnet++ which was perfectly compiling and working for previous pytorch version is not working anymore and return the following error when importing :

ImportError: /home/lelouedec/anaconda3/envs/test1/lib/python3.7/site-packages/point-0.0.0-py3.7-linux-x86_64.egg/point.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E

The implementation can be found here :

EDIT :
Installing pytorch but specifying cudatoolkit=10.1 seems to remove the error, but havent tested fully yet.
Also the toolkit version dowloading when specifying cudatoolkit is the one for cuda 10.0 on the CUDNN website

Maybe it’s something about having the version it is compiled with and the one it is run with go out of sync?
My impression is that unless you use some internal API, that is the most common source of the error.

Best regards

Thomas

Good morning,

Sorry for the late answer, it was indeed a problem of versions. Somehow it compiled using the system cuda and not the one installed with pytorch (problem with path or something) and it yielded this error.
The way to avoid these symbols error is to always check the cudatoolkit version used at compilation, the system one and pytorch version.