[mlgo] Use have_tflite instead of have_tf_api
authorKazu Hirata <kazu@google.com>
Thu, 15 Dec 2022 21:54:25 +0000 (13:54 -0800)
committerKazu Hirata <kazu@google.com>
Thu, 15 Dec 2022 21:54:25 +0000 (13:54 -0800)
We are in the process of retiring LLVM_HAVE_TF_API in favor of
LLVM_HAVE_TFLITE.  This patch takes care of the transition in
llvm/test.

Differential Revision: https://reviews.llvm.org/D140133

20 files changed:
llvm/test/CMakeLists.txt
llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll
llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll
llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll
llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll
llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll
llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll
llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll
llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll
llvm/test/Transforms/Inline/ML/development-training-log.ll
llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll
llvm/test/Transforms/Inline/ML/size-estimator-default.ll
llvm/test/Transforms/Inline/ML/size-estimator-training.ll
llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll
llvm/test/Transforms/Inline/ML/state-tracking.ll
llvm/test/Transforms/Inline/inlining-advisor-default.ll
llvm/test/lit.cfg.py
llvm/test/lit.site.cfg.py.in

index 01e2a6e..ec291cb 100644 (file)
@@ -17,7 +17,7 @@ llvm_canonicalize_cmake_booleans(
   LLVM_ENABLE_PLUGINS
   LLVM_BYE_LINK_INTO_TOOLS
   LLVM_HAVE_TF_AOT
-  LLVM_HAVE_TF_API
+  LLVM_HAVE_TFLITE
   LLVM_INLINER_MODEL_AUTOGENERATED
   LLVM_RAEVICT_MODEL_AUTOGENERATED
   LLVM_ENABLE_EXPENSIVE_CHECKS
index 2344859..0f4485e 100644 (file)
@@ -1,7 +1,7 @@
 ; Check that, in the absence of dependencies, we emit an error message when
 ; trying to use ML-driven advisor.
 ; REQUIRES: !have_tf_aot
-; REQUIRES: !have_tf_api
+; REQUIRES: !have_tflite
 ; REQUIRES: default_triple
 ; RUN: not llc -O2 -regalloc-enable-advisor=development < %s 2>&1 | FileCheck %s
 ; RUN: not llc -O2 -regalloc-enable-advisor=release < %s 2>&1 | FileCheck %s
index 839847c..75bae31 100644 (file)
@@ -1,7 +1,7 @@
 ; Check that, in the absence of dependencies, we emit an error message when
 ; trying to use ML-driven advisor.
 ; REQUIRES: !have_tf_aot
-; REQUIRES: !have_tf_api
+; REQUIRES: !have_tflite
 ; REQUIRES: default_triple
 ; RUN: not llc -O2 -regalloc-enable-priority-advisor=development < %s 2>&1 | FileCheck %s
 ; RUN: not llc -O2 -regalloc-enable-priority-advisor=release < %s 2>&1 | FileCheck %s
index 2111d8c..b7009ed 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: x86_64-linux
 ;
 ; Check that we log the currently in development features correctly with both the default
index 14183ca..c53da24 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: x86_64-linux
 ;
 ; Check that we can log more than 1 function.
index f3c93f2..c73a71c 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: x86_64-linux
 ;
 ; Check that we log correctly, both with a learned policy, and the default policy
index facaadb..79bf2c7 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: x86_64-linux
 ;
 ; Check that we log correctly, both with a learned policy, and the default policy
index a4b354d..31d5665 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: llvm_raevict_model_autogenerated
 ; REQUIRES: x86_64-linux
 ;
index d272bb0..a78f452 100644 (file)
@@ -4,7 +4,7 @@
 ; learn from it).
 ; However, when we discover we 'trip' over the artificially-low size increase 
 ; factor, we penalize the 'bad' decision.
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ;
 ; Generate mock model
 ; RUN: rm -rf %t
index 3b6e562..4a389a8 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner \
 ; RUN:     -training-log=- -tfutils-text-log  -S < %s | FileCheck %s 
 
index a0b8d73..5f942a3 100644 (file)
@@ -1,5 +1,5 @@
 ; Test that we can produce a log if we have or do not have a model, in development mode.
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; Generate mock model
 ; RUN: rm -rf %t_savedmodel %t
 ; RUN: %python %S/../../../../lib/Analysis/models/gen-inline-oz-test-model.py %t_savedmodel
index 58150e1..e5aece6 100644 (file)
@@ -5,7 +5,7 @@
 ; This test uses Inputs/test-module.ll, as it shares it with a similar test
 ; for the 'release' mode.
 ;
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; RUN: rm -rf %t
 ; RUN: rm -rf %t_savedmodel
 ; RUN: %python %S/../../../../lib/Analysis/models/gen-inline-oz-test-model.py %t_savedmodel
index 88881c6..c9e5978 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: !have_tf_api
+; REQUIRES: !have_tflite
 ; RUN: opt -passes='print<inliner-size-estimator>' -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s
 
 ; CHECK: [InlineSizeEstimatorAnalysis] size estimate for branches: None
\ No newline at end of file
index 7197f74..462cc64 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; RUN: opt -passes='print<inliner-size-estimator>' -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s --check-prefix=DEFAULT
 ; RUN: opt -passes='print<inliner-size-estimator>' -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s
 
index de0f6d1..40731ec 100644 (file)
@@ -2,7 +2,7 @@
 ; Corosplit will keep f1 and add 3 more functions.
 ; RUN: opt -passes='default<O1>,print<inline-advisor>' -training-log=/dev/null \
 ; RUN:   -S -enable-ml-inliner=development -keep-inline-advisor-for-printing < %s 2>&1 | FileCheck %s
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ;
 ; CHECK: [MLInlineAdvisor] Nodes: 4 Edges: 0
 
index ef844c4..0063586 100644 (file)
@@ -1,7 +1,7 @@
 ; Based on llvm/test/Other/cgscc-iterate-function-mutation.ll
 ; RUN: opt -passes='default<O3>,print<inline-advisor>' -training-log=/dev/null \
 ; RUN:   -S -enable-ml-inliner=development -keep-inline-advisor-for-printing < %s 2>&1 | FileCheck %s
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ;
 ; CHECK: [MLInlineAdvisor] Nodes: 36 Edges: 0
 
index 14d7190..04dc077 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: opt -passes='default<O3>,print<inline-advisor>' -training-log=/dev/null \
 ; RUN:   -S -enable-ml-inliner=development -keep-inline-advisor-for-printing < %s 2>&1 | FileCheck %s
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ;
 ; CHECK: [MLInlineAdvisor] Nodes: 3 Edges: 1
 
index 8a760ff..502a162 100644 (file)
@@ -1,7 +1,7 @@
 ; Check that, in the absence of dependencies, we emit an error message when
 ; trying to use ML-driven inlining.
 ; REQUIRES: !have_tf_aot
-; REQUIRES: !have_tf_api
+; REQUIRES: !have_tflite
 ; RUN: not opt -passes=scc-oz-module-inliner -enable-ml-inliner=development -S < %s 2>&1 | FileCheck %s
 ; RUN: not opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -S < %s 2>&1 | FileCheck %s
 
index 500cbd6..6548cec 100644 (file)
@@ -304,8 +304,8 @@ if config.link_llvm_dylib:
 if config.have_tf_aot:
     config.available_features.add("have_tf_aot")
 
-if config.have_tf_api:
-    config.available_features.add("have_tf_api")
+if config.have_tflite:
+    config.available_features.add("have_tflite")
 
 if config.llvm_inliner_model_autogenerated:
     config.available_features.add("llvm_inliner_model_autogenerated")
index a23355f..a4116d8 100644 (file)
@@ -53,7 +53,7 @@ config.libcxx_used = @LLVM_LIBCXX_USED@
 config.has_plugins = @LLVM_ENABLE_PLUGINS@
 config.linked_bye_extension = @LLVM_BYE_LINK_INTO_TOOLS@
 config.have_tf_aot = @LLVM_HAVE_TF_AOT@
-config.have_tf_api = @LLVM_HAVE_TF_API@
+config.have_tflite = @LLVM_HAVE_TFLITE@
 config.llvm_inliner_model_autogenerated = @LLVM_INLINER_MODEL_AUTOGENERATED@
 config.llvm_raevict_model_autogenerated = @LLVM_RAEVICT_MODEL_AUTOGENERATED@
 config.expensive_checks = @LLVM_ENABLE_EXPENSIVE_CHECKS@