[llvm] 3442309 - [mlgo] Use have_tflite instead of have_tf_api

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 13:54:31 PST 2022


Author: Kazu Hirata
Date: 2022-12-15T13:54:25-08:00
New Revision: 344230913812cec3b4509c0216cefce06f69dd4d

URL: https://github.com/llvm/llvm-project/commit/344230913812cec3b4509c0216cefce06f69dd4d
DIFF: https://github.com/llvm/llvm-project/commit/344230913812cec3b4509c0216cefce06f69dd4d.diff

LOG: [mlgo] Use have_tflite instead of have_tf_api

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

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 01e2a6ebf6c72..ec291cbac0dbf 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll b/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll
index 234485923f839..0f4485e2de1d9 100644
--- a/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll
+++ b/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll b/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll
index 839847c54c030..75bae31663433 100644
--- a/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll
+++ b/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll
index 2111d8cd0f8f6..b7009ed8ac564 100644
--- a/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll
+++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll
index 14183ca8a9b6a..c53da24410e4d 100644
--- a/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll
+++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: x86_64-linux
 ;
 ; Check that we can log more than 1 function.

diff  --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll
index f3c93f22cb0d0..c73a71c7bc32c 100644
--- a/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll
+++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll
index facaadbf85a53..79bf2c73daad1 100644
--- a/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll
+++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll
@@ -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

diff  --git a/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll b/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll
index a4b354d6a0ae9..31d56651c4fe8 100644
--- a/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll
+++ b/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll
@@ -1,4 +1,4 @@
-; REQUIRES: have_tf_api
+; REQUIRES: have_tflite
 ; REQUIRES: llvm_raevict_model_autogenerated
 ; REQUIRES: x86_64-linux
 ;

diff  --git a/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll b/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
index d272bb0f7a838..a78f4523b2137 100644
--- a/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
+++ b/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
@@ -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

diff  --git a/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll b/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll
index 3b6e56221e597..4a389a8277684 100644
--- a/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll
+++ b/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll
@@ -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 
 

diff  --git a/llvm/test/Transforms/Inline/ML/development-training-log.ll b/llvm/test/Transforms/Inline/ML/development-training-log.ll
index a0b8d730a19b3..5f942a310fa05 100644
--- a/llvm/test/Transforms/Inline/ML/development-training-log.ll
+++ b/llvm/test/Transforms/Inline/ML/development-training-log.ll
@@ -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

diff  --git a/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll b/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll
index 58150e1dddf96..e5aece66f6dc9 100644
--- a/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll
+++ b/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll
@@ -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

diff  --git a/llvm/test/Transforms/Inline/ML/size-estimator-default.ll b/llvm/test/Transforms/Inline/ML/size-estimator-default.ll
index 88881c636d8b9..c9e5978ccfc39 100644
--- a/llvm/test/Transforms/Inline/ML/size-estimator-default.ll
+++ b/llvm/test/Transforms/Inline/ML/size-estimator-default.ll
@@ -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

diff  --git a/llvm/test/Transforms/Inline/ML/size-estimator-training.ll b/llvm/test/Transforms/Inline/ML/size-estimator-training.ll
index 7197f7432517c..462cc6459e333 100644
--- a/llvm/test/Transforms/Inline/ML/size-estimator-training.ll
+++ b/llvm/test/Transforms/Inline/ML/size-estimator-training.ll
@@ -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
 

diff  --git a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
index de0f6d14b0814..40731ec83a70e 100644
--- a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
+++ b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
@@ -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
 

diff  --git a/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll b/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll
index ef844c44a7acd..0063586f9432e 100644
--- a/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll
+++ b/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll
@@ -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
 

diff  --git a/llvm/test/Transforms/Inline/ML/state-tracking.ll b/llvm/test/Transforms/Inline/ML/state-tracking.ll
index 14d719050c09b..04dc077680247 100644
--- a/llvm/test/Transforms/Inline/ML/state-tracking.ll
+++ b/llvm/test/Transforms/Inline/ML/state-tracking.ll
@@ -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
 

diff  --git a/llvm/test/Transforms/Inline/inlining-advisor-default.ll b/llvm/test/Transforms/Inline/inlining-advisor-default.ll
index 8a760ff5b3a8a..502a16280192d 100644
--- a/llvm/test/Transforms/Inline/inlining-advisor-default.ll
+++ b/llvm/test/Transforms/Inline/inlining-advisor-default.ll
@@ -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
 

diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 500cbd68b494e..6548cec8bc5a8 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -304,8 +304,8 @@ def version_int(ver):
 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")

diff  --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in
index a23355fbf24a1..a4116d8c21394 100644
--- a/llvm/test/lit.site.cfg.py.in
+++ b/llvm/test/lit.site.cfg.py.in
@@ -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@


        


More information about the llvm-commits mailing list