So, pytorch builds some final shared objects that contain all the code. If you want to use pytorch as a C/++ library, you have to link against _C.so and libshm and libcaffe2
The problem I’ve run into on OSX is this:
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file
I need to add a target to pytorch to get it to build me a dylib file. I know that python can load it.
Following the response here:
I think I only need to change the command that produces the .so from using -bundle to -shared. I don’t know where that is, and I’m not familiar with python’s setup.py conventions.