[PATCH] D91751: [NFC][TFUtils] Extract out the output spec loader

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 17:50:00 PST 2020


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


================
Comment at: llvm/include/llvm/Analysis/Utils/TFUtils.h:204-207
   TFModelEvaluator(StringRef SavedModelPath,
                    const std::vector<TensorSpec> &InputSpecs,
                    const std::vector<TensorSpec> &OutputSpecs,
                    const char *Tags = "serve");
----------------
yundiqian wrote:
> Do we still need this function?
We can keep it as a lower primitive.


================
Comment at: llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp:486
+  Evaluator = std::make_unique<TFModelEvaluator>(
+      ModelPath, InputSpecs, [&](size_t I) { return OutputSpecs[I].Spec; },
+      OutputSpecs.size());
----------------
yundiqian wrote:
> why not passing in OutputSpecs?
because those are LoggedFeatureSpecs, so they include the extra name for logging. The evaluator doesn't care about that, and we shouldn't muddy the abstraction layers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91751



More information about the llvm-commits mailing list