[PATCH] D116076: [NFC][mlgo] Add feature declarations for the ML regalloc advisor
Yundi Qian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 3 00:06:28 PST 2022
yundiqian added inline comments.
================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:139-144
+template <typename T> size_t getTotalSize(const std::vector<int64_t> &Shape) {
+ size_t Ret = sizeof(T);
+ for (const auto V : Shape)
+ Ret *= V;
+ return Ret;
+}
----------------
should this be a common function somewhere?
================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:146
+
+void resetInputs(MLModelRunner &Runner) {
+#define _RESET(TYPE, NAME, SHAPE, __) \
----------------
what's the use case for this function? do we just set the value when needed?
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