Hi,
I am trying to implement a C extension of radon transform for pytorch source code. However, when I try to build it, a link error pops
_th_radon.obj : warning LNK4197: export 'PyInit__th_radon' specified multiple times; using first specification
Creating library .\Release\_th_radon.lib and object .\Release\_th_radon.exp
_th_radon.obj : error LNK2001: unresolved external symbol cpu_radon
th_radon.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_data
th_radon.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_size
.\_th_radon.pyd : fatal error LNK1120: 3 unresolved externals
...
cffi.VerificationError: LinkError: command 'D:\\Programs\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120
I have no idea what happened. The evironment of my PC is
Windows 10,
Visual Studio 2015,
PyTorch 0.4.1
Python 3.5.4
Any suggestion is appreciated.
It is said that the ATen Library in PyTorch 1.0 is better see here, however Iām not clear how to convert the code using cffi
to the CppExtension
.
Thanks for your help.