[PATCH] D116985: [MLGO] Add support for multiple training traces per module

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 18:24:28 PST 2022


mtrofin created this revision.
mtrofin added a reviewer: yundiqian.
Herald added a subscriber: hiraditya.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This happens in e.g. regalloc, where we trace decisions per function,
but wouldn't want to spew N log files (i.e. one per function). So we
output a key-value association, where the key is an ID for the
sub-module object, and the value is the tensorflow::SequenceExample.

The current relation with protobuf is tenuous, so we're avoiding a
custom message type in favor of using the `Struct` message, but that
requires the values be wire-able strings, hence base64 encoding.

We plan on resolving the protobuf situation shortly, and improve the
encoding of such logs, but this is sufficient for now for setting up
regalloc training.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116985

Files:
  llvm/include/llvm/Analysis/Utils/TFUtils.h
  llvm/lib/Analysis/TFUtils.cpp
  llvm/unittests/Analysis/TFUtilsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116985.398802.patch
Type: text/x-patch
Size: 5156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220111/f9b8fa4c/attachment-0001.bin>


More information about the llvm-commits mailing list