Pytorch 2 and the c++ interface

This post might be relevant.