From 344230913812cec3b4509c0216cefce06f69dd4d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 15 Dec 2022 13:54:25 -0800 Subject: [PATCH] [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 --- llvm/test/CMakeLists.txt | 2 +- llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll | 2 +- llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll | 2 +- llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll | 2 +- llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll | 2 +- llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll | 2 +- llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll | 2 +- llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll | 2 +- llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll | 2 +- llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll | 2 +- llvm/test/Transforms/Inline/ML/development-training-log.ll | 2 +- llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll | 2 +- llvm/test/Transforms/Inline/ML/size-estimator-default.ll | 2 +- llvm/test/Transforms/Inline/ML/size-estimator-training.ll | 2 +- llvm/test/Transforms/Inline/ML/state-tracking-coro.ll | 2 +- llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll | 2 +- llvm/test/Transforms/Inline/ML/state-tracking.ll | 2 +- llvm/test/Transforms/Inline/inlining-advisor-default.ll | 2 +- llvm/test/lit.cfg.py | 4 ++-- llvm/test/lit.site.cfg.py.in | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt index 01e2a6e..ec291cb 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 2344859..0f4485e 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 839847c..75bae31 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 2111d8c..b7009ed 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 14183ca..c53da24 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 f3c93f2..c73a71c 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 facaadb..79bf2c7 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 a4b354d..31d5665 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 d272bb0..a78f452 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 3b6e562..4a389a8 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 a0b8d73..5f942a31 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 58150e1d..e5aece6 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 88881c6..c9e5978 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' -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 7197f74..462cc64 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' -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s --check-prefix=DEFAULT ; RUN: opt -passes='print' -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 de0f6d1..40731ec 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,print' -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 ef844c4..0063586 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,print' -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 14d7190..04dc077 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,print' -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 8a760ff..502a162 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 500cbd6..6548cec 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -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") diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in index a23355f..a4116d8 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@ -- 2.7.4