[mlgo] Disable mlgo tests when python version is 6
authorMircea Trofin <mtrofin@google.com>
Sat, 4 Feb 2023 03:41:07 +0000 (19:41 -0800)
committerMircea Trofin <mtrofin@google.com>
Sat, 4 Feb 2023 03:45:22 +0000 (19:45 -0800)
Supporting 3.6 requires a bit too much of a change in the mlgo test python scripts.

llvm/lib/Analysis/models/interactive_host.py
llvm/test/CodeGen/MLRegalloc/lit.local.cfg [new file with mode: 0644]
llvm/test/Transforms/Inline/ML/lit.local.cfg [new file with mode: 0644]

index 7b168e8..79c74ac 100644 (file)
@@ -17,7 +17,7 @@ import io
 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 (file)
index 0000000..cc7f7b8
--- /dev/null
@@ -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 (file)
index 0000000..cc7f7b8
--- /dev/null
@@ -0,0 +1,3 @@
+import sys
+
+config.unsupported = sys.version_info.minor <= 6