This is an archive of the discontinued LLVM Phabricator instance.

[MLGO] Use binary protobufs for improved training performance.
ClosedPublic

Authored by mtrofin on Jul 16 2021, 8:25 AM.

Details

Summary

It turns out that during training, the time required to parse the
textual protobuf of a training log is about the same as the time it
takes to compile the module generating that log. Using binary protobufs
instead elides that cost almost completely.

Diff Detail

Event Timeline

mtrofin created this revision.Jul 16 2021, 8:25 AM
mtrofin requested review of this revision.Jul 16 2021, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2021, 8:25 AM
phosek added inline comments.Jul 16 2021, 1:43 PM
llvm/CMakeLists.txt
796–804

Can we also provide a way to pass this as a CMake variable? In our case calling pip may not work.

mtrofin updated this revision to Diff 359480.Jul 16 2021, 4:41 PM
  • tests
  • added option to specific proto header location
mtrofin marked an inline comment as done.Jul 19 2021, 10:24 AM
mtrofin added inline comments.
llvm/CMakeLists.txt
796–804

Ya, let's use TF_PROTO_HEADERS?

phosek accepted this revision.Jul 19 2021, 1:43 PM

LGTM

This revision is now accepted and ready to land.Jul 19 2021, 1:43 PM
This revision was landed with ongoing or failed builds.Jul 19 2021, 1:59 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked an inline comment as done.