[PATCH] D119507: [MLGO] Use TFLite in 'development mode'

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 08:35:34 PDT 2022


mtrofin added inline comments.


================
Comment at: llvm/lib/Analysis/models/gen-regalloc-eviction-test-model.py:49
   def action(*inputs):
-    result = tf.math.argmax(inputs[0]['mask'], axis=-1) + module.var
+    result = tf.math.argmax(
+        tf.cast(inputs[0]['mask'], tf.int32), axis=-1) + module.var
----------------
To reviewers: I'll send this separately before landing this patch.


================
Comment at: llvm/unittests/Analysis/TFUtilsTest.cpp:92
   TFModelEvaluator Evaluator(getModelPath(), InputSpecs, OutputSpecs);
-  EXPECT_TRUE(Evaluator.isValid());
-
----------------
This was removed because with TFLite we can eagerly make the determination that the input is invalid. We don't need to wait to evaluate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119507



More information about the llvm-commits mailing list