[PATCH] D142642: [mlgo] Introduce an "InteractiveModelRunner"

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 19:51:12 PST 2023


mtrofin added inline comments.


================
Comment at: llvm/unittests/Analysis/MLModelRunnerTest.cpp:166
+
+  Evaluator.switchContext("hi");
+
----------------
ChrisCummins wrote:
> What does `switchContext()` do?
suppose this was regalloc. It writes a one-line json saying that all following observations are for the function specified in the parameter of `switchContext`

For inlining, the context is the hole compilation unit, so `switchContext` can have any parameter (i.e. it can be ignored on the reader side)

https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Analysis/Utils/TrainingLogger.h#L39




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142642/new/

https://reviews.llvm.org/D142642



More information about the llvm-commits mailing list