I’d like a fast serialization for a tensor. Right now, I’m using
x = torch.Tensor(...)
serialized = pickle.dumps(x)
The tensor is not guaranteed to live on the CPU and I want to preserve CPU–GPU bandwidth, meaning I can not use
Is there a fast serialization method for torch Tensors?
Notes on research I’ve done so far:
- the source for
torch.serialization and it relies on pickle.dumps (plus it seems oriented towards files, not speed).
- blosc has
compress_ptr which could be useful with
- I’ve looked at pyarrow too, but decided to ask here first