[PATCH] D142168: [mlgo] Stream the training data

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 18:04:40 PST 2023


MatzeB added inline comments.


================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:468-469
+    if (Log->currentContext() != MF.getName()) {
+      MF.getFunction().getContext().emitError(
+          "The training log context shouldn't have had changed.");
+    }
----------------
mtrofin wrote:
> MatzeB wrote:
> > I think I am hitting this for cases where `RegAllocGreedy` bails out early in the `if (!hasVirtRegAlloc()) return false;` check and never initializes the advisor.
> > 
> > Replacing with `Log->switchCurrentContext()` for my experiments...
> ack. I'll take a look. Probably in that case `(!hasVirtRegAlloc())` there's also no output to log, right?
Guess I can also try to first test for `hasObservationInProgress()` and bail out on that before checking the function name... Rebuilding and testing right now...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142168



More information about the llvm-commits mailing list