[MLGO] Make TFLiteUtils throw an error if some features haven't been passed to the...
authorAiden Grossman <agrossman154@yahoo.com>
Wed, 7 Sep 2022 20:36:09 +0000 (20:36 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Sat, 10 Sep 2022 22:59:03 +0000 (22:59 +0000)
commitec83c7e358ecd7db9af2d980b6d528f5ea6865a4
treeb8d4b18bed49247c7b05035df1fd2678e667d31a
parenta38e5a4b192a13d5c5fa8a6a27d58da8cdf4af00
[MLGO] Make TFLiteUtils throw an error if some features haven't been passed to the model

In the Tensorflow C lib utilities, an error gets thrown if some features
haven't gotten passed into the model (due to differences in ordering
which now don't exist with the transition to TFLite). However, this is
not currently the case when using TFLiteUtils. This patch makes some
minor changes to throw an error when not all inputs of the model have
been passed, which when not handled will result in a seg fault within
TFLite.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D133451
llvm/lib/Analysis/TFLiteUtils.cpp
llvm/unittests/Analysis/TFUtilsTest.cpp