I have a c++ process that constructs torch Tensor’s and writes their numerical values to datasets in an hdf5 file. It takes advantages of hdf5’s parallel write capabilities by using multiple threads, each of which writes to a part of the hdf5 file. After the file is written, a python process loads the hdf5 data and converts it into torch Tensor’s.
I am wondering if I can eliminate the hdf5 middleman here. When I google for phrases like “c++ pytorch write tensor disk”, I don’t see clear tutorials or examples of how to do this. Is this type of workflow supported? Where can I find clear documentation on this?