This is an archive of the discontinued LLVM Phabricator instance.

[MLGO] Force persistency in tflite buffers.
ClosedPublic

Authored by jacobhegna on Oct 11 2022, 7:11 PM.

Details

Summary

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".

Diff Detail

Event Timeline

jacobhegna created this revision.Oct 11 2022, 7:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 7:11 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
jacobhegna requested review of this revision.Oct 11 2022, 7:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 7:11 PM
mtrofin accepted this revision.Oct 11 2022, 7:32 PM

Thanks!

This revision is now accepted and ready to land.Oct 11 2022, 7:32 PM
mtrofin added inline comments.Oct 11 2022, 7:33 PM
llvm/lib/Analysis/TFLiteUtils.cpp
129

Move the !Interpreter check before this

Move interpreter check before modifying the allocation type.

This revision was landed with ongoing or failed builds.Oct 12 2022, 12:50 PM
This revision was automatically updated to reflect the committed changes.