[PATCH] D116076: [NFC][mlgo] Add feature declarations for the ML regalloc advisor

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 08:28:14 PST 2022


mtrofin marked 2 inline comments as done.
mtrofin added inline comments.


================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:146
+
+void resetInputs(MLModelRunner &Runner) {
+#define _RESET(TYPE, NAME, SHAPE, __)                                          \
----------------
yundiqian wrote:
> what's the use case for this function? do we just set the value when needed?
see the comment on line 136. The template `getTotalSize` and the macro go hand in hand. The use case (resetting) is specific to regalloc.

It's not impossible to make these APIs of the `MLModelRunner`, but it'd involve exposing some notion of tensor type to the non-development mode runners, and we don't need that right now elsewhere. I'd prefer to wait and see if there are more usecases like this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116076



More information about the llvm-commits mailing list