[llvm] 79f7a5e - [mlgo] Disable mlgo tests when python version is 6

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 19:45:31 PST 2023


Author: Mircea Trofin
Date: 2023-02-03T19:45:22-08:00
New Revision: 79f7a5e02bf6612af9da4f96c47d60d370dd84d0

URL: https://github.com/llvm/llvm-project/commit/79f7a5e02bf6612af9da4f96c47d60d370dd84d0
DIFF: https://github.com/llvm/llvm-project/commit/79f7a5e02bf6612af9da4f96c47d60d370dd84d0.diff

LOG: [mlgo] Disable mlgo tests when python version is 6

Supporting 3.6 requires a bit too much of a change in the mlgo test python scripts.

Added: 
    llvm/test/CodeGen/MLRegalloc/lit.local.cfg
    llvm/test/Transforms/Inline/ML/lit.local.cfg

Modified: 
    llvm/lib/Analysis/models/interactive_host.py

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/models/interactive_host.py b/llvm/lib/Analysis/models/interactive_host.py
index 7b168e82fb62..79c74ac3cd88 100644
--- a/llvm/lib/Analysis/models/interactive_host.py
+++ b/llvm/lib/Analysis/models/interactive_host.py
@@ -17,7 +17,7 @@
 import math
 import os
 import subprocess
-from typing import BinaryIO, Callable, Union
+from typing import Callable, List, Union
 
 
 def send(f: io.BufferedWriter, value: Union[int, float],
@@ -33,9 +33,9 @@ def send(f: io.BufferedWriter, value: Union[int, float],
 
 
 def run_interactive(temp_rootname: str,
-                    make_response: Callable[[list[log_reader.TensorValue]],
+                    make_response: Callable[[List[log_reader.TensorValue]],
                                             Union[int, float]],
-                    process_and_args: list[str]):
+                    process_and_args: List[str]):
   """Host the compiler.
   Args:
     temp_rootname: the base file name from which to construct the 2 pipes for

diff  --git a/llvm/test/CodeGen/MLRegalloc/lit.local.cfg b/llvm/test/CodeGen/MLRegalloc/lit.local.cfg
new file mode 100644
index 000000000000..cc7f7b812a46
--- /dev/null
+++ b/llvm/test/CodeGen/MLRegalloc/lit.local.cfg
@@ -0,0 +1,3 @@
+import sys
+
+config.unsupported = sys.version_info.minor <= 6

diff  --git a/llvm/test/Transforms/Inline/ML/lit.local.cfg b/llvm/test/Transforms/Inline/ML/lit.local.cfg
new file mode 100644
index 000000000000..cc7f7b812a46
--- /dev/null
+++ b/llvm/test/Transforms/Inline/ML/lit.local.cfg
@@ -0,0 +1,3 @@
+import sys
+
+config.unsupported = sys.version_info.minor <= 6


        


More information about the llvm-commits mailing list