[MLGO] Force persistency in tflite buffers.
authorJacob Hegna <jacobhegna@google.com>
Wed, 12 Oct 2022 02:05:19 +0000 (02:05 +0000)
committerJacob Hegna <jacobhegna@google.com>
Wed, 12 Oct 2022 19:50:36 +0000 (19:50 +0000)
commit9d93a98f853a5c5cf02c0e5e794c8a80fb11fa3a
tree24e89591ebfe45f69078ea5858da236bef9f177a
parent2d8d2bec701b6c1378431d2790e1f50e2a9bb0e3
[MLGO] Force persistency in tflite buffers.

When training large models, we encounter use-after-free bugs when
writing to the input tensors for various MLGO models. This patch fixes the
issue by marking the tensors as "persistent".

Differential Revision: https://reviews.llvm.org/D135739
llvm/lib/Analysis/TFLiteUtils.cpp