Solved by peterjc123 in post #9 
              
              
                Glad it’s working for you. As for the static build, I guess you’ll need to append -DTORCH_BUILD_STATIC_LIBS to the compiler flags when compiling your cpp extension that uses libtorch.