[all-commits] [llvm/llvm-project] 1f5dce: [MLGO] Add support for multiple training traces pe...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Tue Jan 11 16:27:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f5dceb1d0d34e01255a7de6cc112b96ee93d569
      https://github.com/llvm/llvm-project/commit/1f5dceb1d0d34e01255a7de6cc112b96ee93d569
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2022-01-11 (Tue, 11 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/Utils/TFUtils.h
    M llvm/lib/Analysis/TFUtils.cpp
    M llvm/unittests/Analysis/TFUtilsTest.cpp

  Log Message:
  -----------
  [MLGO] Add support for multiple training traces per module

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.

Differential Revision: https://reviews.llvm.org/D116985




More information about the All-commits mailing list