If you want to go back and forth between C/C++ and Python you probably want to use an extension. You should prefer https://github.com/pytorch/extension-cpp 22 over extension-ffi as TH/THC is being slowly deprecated and moved into ATen.
ATen provides a Type::storageFromBlob function which you can use after you open the IPC handle.
I don’t think there’s an equivalent function in Python. It would probably be good for us to add something like that.