[llvm] [MLGO] Remove python-38 flag from tests (PR #96961)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 13:25:25 PDT 2024


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/96961

Previously, we had a python-38 flag for the mlgo-utils tests as they needed a python version higher than what LLVM required by default due to type annotations. Now that LLVM's default Python version minimum is 3.8, we can remove this flag.

>From 3dc066da66ed2bde987892378db122d6ccfece48 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 27 Jun 2024 20:24:06 +0000
Subject: [PATCH] [MLGO] Remove python-38 flag from tests

Previously, we had a python-38 flag for the mlgo-utils tests as they
needed a python version higher than what LLVM required by default due to
type annotations. Now that LLVM's default Python version minimum is 3.8,
we can remove this flag.
---
 .../tests/corpus/combine_training_corpus_script.test         | 2 +-
 .../mlgo-utils/tests/corpus/combine_training_corpus_test.py  | 2 +-
 llvm/utils/mlgo-utils/tests/corpus/extract_ir_script.test    | 2 +-
 llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py        | 2 +-
 llvm/utils/mlgo-utils/tests/corpus/make_corpus_script.test   | 2 +-
 llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py       | 2 +-
 llvm/utils/mlgo-utils/tests/lit.local.cfg                    | 5 -----
 7 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_script.test b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_script.test
index 51dc637347caf..2ee72e73fe7bd 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_script.test
+++ b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_script.test
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Testing that the combine_trainig_corpus script works as expected when
 ## invoked.
diff --git a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
index 4965a63ac2ae7..20541038e001d 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Test the functionality of combine_training_corpus_lib
 
diff --git a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_script.test b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_script.test
index 107116618ce97..104bb9b127794 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_script.test
+++ b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_script.test
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Test that invoking the extract_ir script work as expected.
 
diff --git a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
index 5ee0762a551a5..653c572f4913b 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Test the functionality of extract_ir_lib
 
diff --git a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_script.test b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_script.test
index 9b4d57330f010..ac6cda1d877ae 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_script.test
+++ b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_script.test
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Testing that the make_corpus script works as expected when invoked.
 
diff --git a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
index 0a2246f4572d3..7a36335877876 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, system-linux
+# REQUIRES: system-linux
 
 ## Test the functionality of make_corpus_lib
 
diff --git a/llvm/utils/mlgo-utils/tests/lit.local.cfg b/llvm/utils/mlgo-utils/tests/lit.local.cfg
index e5cbf03104c48..1f0a5fcaa5b07 100644
--- a/llvm/utils/mlgo-utils/tests/lit.local.cfg
+++ b/llvm/utils/mlgo-utils/tests/lit.local.cfg
@@ -1,10 +1,5 @@
 import sys
 
-# TODO(boomanaiden154): Remove this flag once the minimum Python version for
-# the entire project has been bumped to 3.8.
-if sys.version_info > (3,8):
-    config.available_features.add("python-38")
-
 # TODO(boomanaiden154): Remove this flag once we enable type checking in the
 # precommit CI.
 try:



More information about the llvm-commits mailing list