[PATCH] D143218: [mlgo] Hook up the interactive runner to the mlgo-ed passes

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 14:51:23 PST 2023


mtrofin created this revision.
mtrofin added reviewers: kazu, jacobhegna, ChrisCummins.
Herald added subscribers: hiraditya, qcolombet, MatzeB.
Herald added a project: All.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This hooks up the interactive model runner to the passes that support
ml-based decisions. Because the interface to this runner is the exact
same as the one used during inference, we just reuse the exact same
setup we have for "release mode". This makes "release mode" a misnomer -
and that's something we needed to resolve sooner or later (e.g.
supporting more than one embedded model for the same problem was another
reason to drop that nomenclature). That will happen in a subsequent
change.

To use this evaluator, just enable the pass in (currently) "release"
mode, but also pass the base name for the 2 channel files via the
pass-specific flag.

The 2 files are the responsibilty of the hosting process. The added
tests use a minimal, toy such host, illustrating setup and
communication.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143218

Files:
  llvm/include/llvm/Analysis/InlineModelFeatureMaps.h
  llvm/include/llvm/Analysis/InteractiveModelRunner.h
  llvm/include/llvm/Analysis/MLModelRunner.h
  llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
  llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
  llvm/lib/Analysis/InlineAdvisor.cpp
  llvm/lib/Analysis/MLInlineAdvisor.cpp
  llvm/lib/Analysis/models/interactive_host.py
  llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp
  llvm/lib/CodeGen/MLRegallocPriorityAdvisor.cpp
  llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
  llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp
  llvm/test/CodeGen/MLRegalloc/Inputs/interactive_main.py
  llvm/test/CodeGen/MLRegalloc/interactive-mode.ll
  llvm/test/Transforms/Inline/ML/Inputs/interactive_main.py
  llvm/test/Transforms/Inline/ML/interactive-mode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143218.494439.patch
Type: text/x-patch
Size: 21870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230202/91be80bc/attachment.bin>


More information about the llvm-commits mailing list