You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I have the same problem with you. It seems that there is conflict between libtorch and cnpy.
If I link libtorch and cnpy simultaneously to a target, I can't find cnpy using ldd command, which means cnpy doesn't be linked successfully.
If you have figure out this problem or have other useful information, I would really appreciate it!
The problem might have been caused by using an incorrect version of LibTorch during installation. pytorch versions
At first I installed the pre-cxx ABI version, I encountered linking failures with cnpy when trying to link both cnpy and torch to the target. You can use the ldd command to check the dependencies of the generated target. ldd example1
Afterward, I reinstalled the cxx11 ABI version of LibTorch, and the problem was resolved. The difference between cxx11 ABI and pre-cxx ABI
In itself, the choice would not matter too much (I’d probably take the cxx11 ABI).
The tricky part is when combining it with other libraries:
Typically C++ libraries are linked with the cxx11 ABI by default.
The official PyTorch Python module are linked with the old pre-cxx11 ABI, so if you want to use them, you need this.
If you have a mix of these, you are in a real pickle.
Cnpy is having trouble when used in conjunction with PyTorch. I boiled down the problem to having included PyTorch in the CMakeLists.txt as follows
When I do not enforce PyTorch to be found, the example code in the repository runs fine with loading cnpy. Otherwise, I get the following error.
The text was updated successfully, but these errors were encountered: