-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for 0-copy tensors #207
Comments
@colinator , is is possible to serialize and deserialize bytestrings using this library for formats that support this (msgpack, flexbuffers, CBOR, BSON): https://github.com/getml/reflect-cpp/blob/main/docs/bytestring.md You could just implement your own custom parser for your tensors: https://github.com/getml/reflect-cpp/blob/main/docs/custom_parser.md In this case you would use |
Thanks! I will give it a try. |
Now I'm not so sure that byte strings (or deserialization/serialization in general) works with '0-copy'. Meaning, if I have some data 'in hand' from the network, for example - a sequence of bytes that represents a flex-buffer-encoded thing, I want to get a structure such that accessing a variable (or calling a function to get something) from the structure points into the flex buffer-encoded data, without copying the data. In this way I can get true '0-copy': I can turn some bytes from the network, for example, into a 'live' struct with no copying. Maybe I'm missing how to do it... |
Would it be possible to add support for tensor serialization/deserialization? i.e. things like xtensor or eigen? Ideally these would have a '0-copy' ability - you could deserialize the memory directly into the tensor... or maybe just a '0-copy bytestring'? Do byte strings work that way now? Then tensor support could be grafted independently then... right?
The text was updated successfully, but these errors were encountered: