[all-commits] [llvm/llvm-project] f29256: [MLGO] Improved support for AOT cross-targeting sc...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu Jan 20 07:06:29 PST 2022


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

  Changed paths:
    M llvm/CMakeLists.txt
    M llvm/cmake/modules/TensorFlowCompile.cmake
    M llvm/include/llvm/Analysis/InlineAdvisor.h
    M llvm/include/llvm/Config/llvm-config.h.cmake
    M llvm/lib/Analysis/InlineAdvisor.cpp
    M llvm/lib/Analysis/MLInlineAdvisor.cpp
    M llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp
    M llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
    M llvm/lib/CodeGen/RegAllocEvictionAdvisor.h
    M llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll
    M llvm/test/Transforms/Inline/ML/bounds-checks.ll
    M llvm/test/Transforms/Inline/ML/ml-test-release-mode.ll

  Log Message:
  -----------
  [MLGO] Improved support for AOT cross-targeting scenarios

The tensorflow AOT compiler can cross-target, but it can't run on (for
example) arm64. We added earlier support where the AOT-ed header and object
would be built on a separate builder and then passed at build time to
a build host where the AOT compiler can't run, but clang can be otherwise
built.

To simplify such scenarios given we now support more than one AOT-able
case (regalloc and inliner), we make the AOT scenario centered on whether
files are generated, case by case (this includes the "passed from a
different builder" scenario).
This means we shouldn't need an 'umbrella' LLVM_HAVE_TF_AOT, in favor of
case by case control. A builder can opt out of an AOT case by passing that case's
model path as `none`. Note that the overrides still take precedence.

This patch controls conditional compilation with case-specific flags,
which can be enabled locally, for the component where those are
available. We still keep an overall flag for some tests.

The 'development/training' mode is unchanged, because there the model is
passed from the command line and interpreted.

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




More information about the All-commits mailing list