Fix unit tests for ops with states
Bug: 67427635
These tests got broken during the transition from the stateful API
to a stateless API.
This CL fixes them (LSTMTest, RNNTest, and SVDFTest) to correctly
use double buffering to manage states in the client, i.e., swapping
the two buffers for states before and after the ops across inferences.
Test: LSTMTest: adb shell /data/nativetest64/lstm_test/lstm_test
Test: RNNTest: adb shell /data/nativetest64/rnn_test/rnn_test
Test: SVDFTest: adb shell /data/nativetest64/svdf_test/svdf_test
Test: NeuralNetworksTest (not affected)
Change-Id: I77e34e42613174ac793410c154f9ecad86e03165
3 files changed