[pipeline] Did TVM support base64 or iostream input instead of ndarray?


#1

Hi guys, i tried plenty modules of tvm and the outcome was quite amazing, but i didn’t find the pipeline support, did tvm support base64 or file as a pipeline for input, it seemed the op is not implemented?
many thks.


#2

Like giving base64 stream as input to PlaceHolder op ?

Can you elaborate the use case ?


#3

Hi @srkreddy1238
Since the image process packages for golang or other languages are not so convenient or efficient as python, sometimes it’s tricky to combine the image preprocess ops with model graph as a whole and load it for inference under some industry environment, then we can feed in the base64 or file iostream as an input.
But it seems tvm doesn’t support these op be converted, say ‘DecodeBase64’ of tensorflow, and apparently it’s not convenient to apply the go tvm infra for online server.

BTW, i compromised to tfgo ops for preprocess before gotvm feed in, more specifically, i built a small tf graph to read a image file, cast, resize it and output a 4d tensor, then i feeded in the tensor to tvm. And it turned out gotvm needed a 1dslice as input to copyfrom, so i had to reshape the 4dtensor into an 1darray, would gotvm support more kinds of golang tensor as input?

thanks


#4

TVM now doesn’t support pre processing operations like tf.io.* .
Lets see if we could consider at least few in coming days.

Here we could use TVM for cast and resize(tvm_op.image.resize) too.

In some other project I had a converter interface to/from tensorflow TensorProto to TVM NDArray in C++. I will see if I can bring it to gotvm.


#5

Great! Please @ me when done.