STT-tensorflow/tensorflow/lite/testdata/dynamic_shapes.bin
Jared Duke b8d991c9b4 [tf.lite] Fix issue with direct ByteBuffer inputs and dynamic graphs
In these graphs, the input tensor pointers may get "refreshed" during
invocation. This refresh is fine if the original pointer came from the
arena, but if it comes from something like the direct ByteBuffer raw
address, the input data will be lost.

Avoid this by simply using memcpy from the direct ByteBuffer. This is
still quite fast, but avoids the hack where we simply inject the
direct ByteBuffer address as the tensor buffer pointer.

A longer term solution will formally allow providing "custom" allocated
regions to tensor inputs, but until then, do the safe thing.

PiperOrigin-RevId: 310643333
Change-Id: I05dfebd24617ebb1af7eb281ff9e530b01669093
2020-05-08 15:51:50 -07:00

5.1 KiB