diff --git a/mlir/examples/standalone/test/CAPI/lit.local.cfg b/mlir/examples/standalone/test/CAPI/lit.local.cfg --- a/mlir/examples/standalone/test/CAPI/lit.local.cfg +++ b/mlir/examples/standalone/test/CAPI/lit.local.cfg @@ -1 +1 @@ -config.suffixes.add('.c') +config.suffixes.add(".c") diff --git a/mlir/examples/standalone/test/python/lit.local.cfg b/mlir/examples/standalone/test/python/lit.local.cfg --- a/mlir/examples/standalone/test/python/lit.local.cfg +++ b/mlir/examples/standalone/test/python/lit.local.cfg @@ -1,4 +1,4 @@ -config.suffixes.add('.py') +config.suffixes.add(".py") if not config.enable_bindings_python: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/CAPI/lit.local.cfg b/mlir/test/CAPI/lit.local.cfg --- a/mlir/test/CAPI/lit.local.cfg +++ b/mlir/test/CAPI/lit.local.cfg @@ -1 +1 @@ -config.suffixes.add('.c') +config.suffixes.add(".c") diff --git a/mlir/test/Conversion/GPUToCUDA/lit.local.cfg b/mlir/test/Conversion/GPUToCUDA/lit.local.cfg --- a/mlir/test/Conversion/GPUToCUDA/lit.local.cfg +++ b/mlir/test/Conversion/GPUToCUDA/lit.local.cfg @@ -1,2 +1,2 @@ if not config.run_cuda_tests: - config.unsupported = True \ No newline at end of file + config.unsupported = True diff --git a/mlir/test/Conversion/GPUToROCm/lit.local.cfg b/mlir/test/Conversion/GPUToROCm/lit.local.cfg --- a/mlir/test/Conversion/GPUToROCm/lit.local.cfg +++ b/mlir/test/Conversion/GPUToROCm/lit.local.cfg @@ -1,2 +1,2 @@ if not config.run_rocm_tests: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Examples/Toy/Ch6/lit.local.cfg b/mlir/test/Examples/Toy/Ch6/lit.local.cfg --- a/mlir/test/Examples/Toy/Ch6/lit.local.cfg +++ b/mlir/test/Examples/Toy/Ch6/lit.local.cfg @@ -1,5 +1,3 @@ # Requires native execution. -if 'host-supports-jit' not in config.available_features: +if "host-supports-jit" not in config.available_features: config.unsupported = True - - diff --git a/mlir/test/Examples/Toy/Ch7/lit.local.cfg b/mlir/test/Examples/Toy/Ch7/lit.local.cfg --- a/mlir/test/Examples/Toy/Ch7/lit.local.cfg +++ b/mlir/test/Examples/Toy/Ch7/lit.local.cfg @@ -1,5 +1,3 @@ # Requires native execution. -if 'host-supports-jit' not in config.available_features: +if "host-supports-jit" not in config.available_features: config.unsupported = True - - diff --git a/mlir/test/Examples/lit.local.cfg b/mlir/test/Examples/lit.local.cfg --- a/mlir/test/Examples/lit.local.cfg +++ b/mlir/test/Examples/lit.local.cfg @@ -1,2 +1,2 @@ if not config.build_examples: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Examples/standalone/lit.local.cfg b/mlir/test/Examples/standalone/lit.local.cfg --- a/mlir/test/Examples/standalone/lit.local.cfg +++ b/mlir/test/Examples/standalone/lit.local.cfg @@ -1,13 +1,12 @@ # Disable with sanitizers for now, this require some more setup apparently. -for san in ['asan', 'msan', 'ubsan']: - if (san in config.available_features): - config.unsupported = True +for san in ["asan", "msan", "ubsan"]: + if san in config.available_features: + config.unsupported = True config.substitutions.append(("%cmake_exe", config.host_cmake)) config.substitutions.append(("%cmake_generator", config.host_cmake_generator)) config.substitutions.append(("%host_cxx", config.host_cxx)) config.substitutions.append(("%host_cc", config.host_cc)) config.substitutions.append(("%enable_libcxx", config.enable_libcxx)) -config.substitutions.append( - ("%mlir_cmake_dir", config.mlir_cmake_dir)) +config.substitutions.append(("%mlir_cmake_dir", config.mlir_cmake_dir)) config.substitutions.append(("%llvm_use_linker", config.llvm_use_linker)) diff --git a/mlir/test/Integration/Dialect/Async/CPU/lit.local.cfg b/mlir/test/Integration/Dialect/Async/CPU/lit.local.cfg --- a/mlir/test/Integration/Dialect/Async/CPU/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Async/CPU/lit.local.cfg @@ -1,5 +1,5 @@ import sys # Windows does not have aligned_alloc -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True diff --git a/mlir/test/Integration/Dialect/LLVMIR/CPU/X86/lit.local.cfg b/mlir/test/Integration/Dialect/LLVMIR/CPU/X86/lit.local.cfg --- a/mlir/test/Integration/Dialect/LLVMIR/CPU/X86/lit.local.cfg +++ b/mlir/test/Integration/Dialect/LLVMIR/CPU/X86/lit.local.cfg @@ -1,4 +1,4 @@ import platform -if platform.machine() != 'x86_64': +if platform.machine() != "x86_64": config.unsupported = True diff --git a/mlir/test/Integration/Dialect/LLVMIR/CPU/lit.local.cfg b/mlir/test/Integration/Dialect/LLVMIR/CPU/lit.local.cfg --- a/mlir/test/Integration/Dialect/LLVMIR/CPU/lit.local.cfg +++ b/mlir/test/Integration/Dialect/LLVMIR/CPU/lit.local.cfg @@ -1,18 +1,22 @@ import sys -lli_cmd = 'lli' +lli_cmd = "lli" if config.riscv_emulator_lli_executable: lli_cmd = config.riscv_emulator_lli_executable -config.substitutions.append(('%mlir_native_utils_lib_dir', - config.riscv_emulator_utils_lib_dir or config.mlir_lib_dir)) +config.substitutions.append( + ( + "%mlir_native_utils_lib_dir", + config.riscv_emulator_utils_lib_dir or config.mlir_lib_dir, + ) +) if config.riscv_vector_emulator_executable: # Run test in qemu emulator. emulation_cmd = config.riscv_vector_emulator_executable if config.riscv_vector_emulator_options: - emulation_cmd = emulation_cmd + ' ' + config.riscv_vector_emulator_options - emulation_cmd = emulation_cmd + ' ' + lli_cmd + ' --march=riscv64 -mattr=+v ' - config.substitutions.append(('%lli', emulation_cmd)) + emulation_cmd = emulation_cmd + " " + config.riscv_vector_emulator_options + emulation_cmd = emulation_cmd + " " + lli_cmd + " --march=riscv64 -mattr=+v " + config.substitutions.append(("%lli", emulation_cmd)) else: - config.substitutions.append(('%lli', lli_cmd)) + config.substitutions.append(("%lli", lli_cmd)) diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg b/mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg @@ -2,14 +2,16 @@ from lit.llvm import llvm_config # FIXME: %mlir_native_utils_lib_dir is set incorrectly on Windows -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True # ArmSVE tests must be enabled via build flag. if config.mlir_run_arm_sve_tests: - config.substitutions.append(('%ENABLE_VLA', 'true')) - config.substitutions.append(('%VLA_ARCH_ATTR_OPTIONS', '--march=aarch64 --mattr="+sve"')) + config.substitutions.append(("%ENABLE_VLA", "true")) + config.substitutions.append( + ("%VLA_ARCH_ATTR_OPTIONS", '--march=aarch64 --mattr="+sve"') + ) else: - config.substitutions.append(('%ENABLE_VLA', 'false')) - config.substitutions.append(('%VLA_ARCH_ATTR_OPTIONS', '')) - config.substitutions.append(('%mlir_native_utils_lib_dir', config.mlir_lib_dir)) + config.substitutions.append(("%ENABLE_VLA", "false")) + config.substitutions.append(("%VLA_ARCH_ATTR_OPTIONS", "")) + config.substitutions.append(("%mlir_native_utils_lib_dir", config.mlir_lib_dir)) diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/lit.local.cfg b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/lit.local.cfg --- a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/lit.local.cfg +++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/lit.local.cfg @@ -1,2 +1,2 @@ if not config.enable_cuda_runner or not config.mlir_run_cuda_sm80_tests: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg b/mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg --- a/mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg +++ b/mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg @@ -1,5 +1,5 @@ # Disable ASAN's leak detection for python OpsDSL tests. -config.environment['ASAN_OPTIONS'] = 'detect_leaks=0' +config.environment["ASAN_OPTIONS"] = "detect_leaks=0" # Only run when python bindings are enabled. if not config.enable_bindings_python: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/Dialect/SparseTensor/taco/lit.local.cfg b/mlir/test/Integration/Dialect/SparseTensor/taco/lit.local.cfg --- a/mlir/test/Integration/Dialect/SparseTensor/taco/lit.local.cfg +++ b/mlir/test/Integration/Dialect/SparseTensor/taco/lit.local.cfg @@ -1,5 +1,5 @@ # Disable ASAN's leak detection for python taco tests. -config.environment['ASAN_OPTIONS'] = 'detect_leaks=0' +config.environment["ASAN_OPTIONS"] = "detect_leaks=0" # Only run when python bindings are enabled. if not config.enable_bindings_python: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg @@ -5,11 +5,11 @@ config.unsupported = True # No JIT on win32. -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True if config.intel_sde_executable: # Run test in emulator (Intel SDE): AMX needs Sapphire Rapids CPU. - config.substitutions.append(('%lli', config.intel_sde_executable + ' -spr -- lli')) + config.substitutions.append(("%lli", config.intel_sde_executable + " -spr -- lli")) else: - config.substitutions.append(('%lli', 'lli')) + config.substitutions.append(("%lli", "lli")) diff --git a/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg @@ -5,5 +5,5 @@ config.unsupported = True # No JIT on win32. -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True diff --git a/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/lit.local.cfg @@ -5,5 +5,5 @@ config.unsupported = True # No JIT on win32. -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg @@ -5,11 +5,11 @@ config.unsupported = True # No JIT on win32. -if sys.platform == 'win32': +if sys.platform == "win32": config.unsupported = True if config.intel_sde_executable: # Run test in emulator (Intel SDE). - config.substitutions.append(('%lli', config.intel_sde_executable + ' -tgl -- lli')) + config.substitutions.append(("%lli", config.intel_sde_executable + " -tgl -- lli")) else: - config.substitutions.append(('%lli', 'lli')) + config.substitutions.append(("%lli", "lli")) diff --git a/mlir/test/Integration/Dialect/Vector/GPU/CUDA/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/GPU/CUDA/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/GPU/CUDA/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/GPU/CUDA/lit.local.cfg @@ -1,2 +1,2 @@ if not config.enable_cuda_runner: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg --- a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg +++ b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg @@ -2,4 +2,4 @@ # TensorCore tests must be enabled via build flag. if not config.mlir_run_cuda_tensor_core_tests: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/GPU/CUDA/lit.local.cfg b/mlir/test/Integration/GPU/CUDA/lit.local.cfg --- a/mlir/test/Integration/GPU/CUDA/lit.local.cfg +++ b/mlir/test/Integration/GPU/CUDA/lit.local.cfg @@ -1,2 +1,2 @@ if not config.enable_cuda_runner: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/Integration/GPU/ROCM/lit.local.cfg b/mlir/test/Integration/GPU/ROCM/lit.local.cfg --- a/mlir/test/Integration/GPU/ROCM/lit.local.cfg +++ b/mlir/test/Integration/GPU/ROCM/lit.local.cfg @@ -1,4 +1,4 @@ if not config.enable_rocm_runner or not config.rocm_test_chipset: - config.unsupported = True + config.unsupported = True -config.substitutions.append(('%chip', config.rocm_test_chipset)) +config.substitutions.append(("%chip", config.rocm_test_chipset)) diff --git a/mlir/test/Integration/lit.local.cfg b/mlir/test/Integration/lit.local.cfg --- a/mlir/test/Integration/lit.local.cfg +++ b/mlir/test/Integration/lit.local.cfg @@ -3,8 +3,9 @@ if not config.mlir_include_integration_tests: config.unsupported = True + def configure_aarch64_lli_cmd(): - lli_cmd = 'lli' + lli_cmd = "lli" # NOTE: If the SVE tests are disabled and the SME tests are enabled to run # under emulation, the SVE specific RUN lines in the SparseTensor tests @@ -12,8 +13,12 @@ if not (config.mlir_run_arm_sve_tests or config.mlir_run_arm_sme_tests): return lli_cmd - config.substitutions.append(('%mlir_native_utils_lib_dir', - config.arm_emulator_utils_lib_dir or config.mlir_lib_dir)) + config.substitutions.append( + ( + "%mlir_native_utils_lib_dir", + config.arm_emulator_utils_lib_dir or config.mlir_lib_dir, + ) + ) if config.arm_emulator_executable: if config.arm_emulator_lli_executable: @@ -23,16 +28,22 @@ # when running under an emulator. If the user didn't specify an lli # executable, use absolute path %llvm_tools_dir/lli. lli_cmd = llvm_config.use_llvm_tool( - 'lli', search_env='LLI', required=True, - search_paths=[config.llvm_tools_dir], use_installed=False + "lli", + search_env="LLI", + required=True, + search_paths=[config.llvm_tools_dir], + use_installed=False, ) # Run test in emulator (qemu or armie) - emulation_cmd = f'{config.arm_emulator_executable} {config.arm_emulator_options}' - lli_cmd = f'{emulation_cmd} {lli_cmd}' + emulation_cmd = ( + f"{config.arm_emulator_executable} {config.arm_emulator_options}" + ) + lli_cmd = f"{emulation_cmd} {lli_cmd}" return lli_cmd + aarch64_lli_cmd = configure_aarch64_lli_cmd() # Configure the following AArch64 substitutions: @@ -52,5 +63,5 @@ # could be used in the SparseTensor tests where necessary, but the meaning # conveyed by the substitution name would be a misnomer if the host target # is not AArch64 and MLIR_RUN_ARM_SVE_TESTS=OFF. -config.substitutions.append(('%lli_aarch64_cmd', aarch64_lli_cmd)) -config.substitutions.append(('%lli_host_or_aarch64_cmd', aarch64_lli_cmd)) +config.substitutions.append(("%lli_aarch64_cmd", aarch64_lli_cmd)) +config.substitutions.append(("%lli_host_or_aarch64_cmd", aarch64_lli_cmd)) diff --git a/mlir/test/lib/Dialect/Test/lit.local.cfg b/mlir/test/lib/Dialect/Test/lit.local.cfg --- a/mlir/test/lib/Dialect/Test/lit.local.cfg +++ b/mlir/test/lib/Dialect/Test/lit.local.cfg @@ -1 +1 @@ -config.suffixes.remove('.td') \ No newline at end of file +config.suffixes.remove(".td") diff --git a/mlir/test/lib/Dialect/Transform/lit.local.cfg b/mlir/test/lib/Dialect/Transform/lit.local.cfg --- a/mlir/test/lib/Dialect/Transform/lit.local.cfg +++ b/mlir/test/lib/Dialect/Transform/lit.local.cfg @@ -1 +1 @@ -config.suffixes.remove('.td') \ No newline at end of file +config.suffixes.remove(".td") diff --git a/mlir/test/lib/Tools/PDLL/lit.local.cfg b/mlir/test/lib/Tools/PDLL/lit.local.cfg --- a/mlir/test/lib/Tools/PDLL/lit.local.cfg +++ b/mlir/test/lib/Tools/PDLL/lit.local.cfg @@ -1 +1 @@ -config.suffixes.remove('.pdll') +config.suffixes.remove(".pdll") diff --git a/mlir/test/lib/Transforms/lit.local.cfg b/mlir/test/lib/Transforms/lit.local.cfg --- a/mlir/test/lib/Transforms/lit.local.cfg +++ b/mlir/test/lib/Transforms/lit.local.cfg @@ -1 +1 @@ -config.suffixes.remove('.pdll') +config.suffixes.remove(".pdll") diff --git a/mlir/test/mlir-cpu-runner/lit.local.cfg b/mlir/test/mlir-cpu-runner/lit.local.cfg --- a/mlir/test/mlir-cpu-runner/lit.local.cfg +++ b/mlir/test/mlir-cpu-runner/lit.local.cfg @@ -1,12 +1,11 @@ import sys # MSAN does not work with JIT. -if 'msan' in config.available_features: - config.unsupported = True +if "msan" in config.available_features: + config.unsupported = True # Requires native execution. -if 'host-supports-jit' not in config.available_features: +if "host-supports-jit" not in config.available_features: config.unsupported = True -config.available_features.add( - config.root.native_target.lower() + '-native-target') +config.available_features.add(config.root.native_target.lower() + "-native-target") diff --git a/mlir/test/mlir-pdll-lsp-server/lit.local.cfg b/mlir/test/mlir-pdll-lsp-server/lit.local.cfg --- a/mlir/test/mlir-pdll-lsp-server/lit.local.cfg +++ b/mlir/test/mlir-pdll-lsp-server/lit.local.cfg @@ -1 +1 @@ -config.excludes = ['include'] +config.excludes = ["include"] diff --git a/mlir/test/mlir-pdll/lit.local.cfg b/mlir/test/mlir-pdll/lit.local.cfg --- a/mlir/test/mlir-pdll/lit.local.cfg +++ b/mlir/test/mlir-pdll/lit.local.cfg @@ -1,2 +1,2 @@ -config.suffixes = ['.pdll', '.mlir'] -config.excludes = ['include'] +config.suffixes = [".pdll", ".mlir"] +config.excludes = ["include"] diff --git a/mlir/test/mlir-spirv-cpu-runner/lit.local.cfg b/mlir/test/mlir-spirv-cpu-runner/lit.local.cfg --- a/mlir/test/mlir-spirv-cpu-runner/lit.local.cfg +++ b/mlir/test/mlir-spirv-cpu-runner/lit.local.cfg @@ -1,4 +1,4 @@ import sys if not config.enable_spirv_cpu_runner: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/mlir-vulkan-runner/lit.local.cfg b/mlir/test/mlir-vulkan-runner/lit.local.cfg --- a/mlir/test/mlir-vulkan-runner/lit.local.cfg +++ b/mlir/test/mlir-vulkan-runner/lit.local.cfg @@ -1,2 +1,2 @@ if not config.enable_vulkan_runner: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/python/dialects/linalg/opdsl/lit.local.cfg b/mlir/test/python/dialects/linalg/opdsl/lit.local.cfg --- a/mlir/test/python/dialects/linalg/opdsl/lit.local.cfg +++ b/mlir/test/python/dialects/linalg/opdsl/lit.local.cfg @@ -4,6 +4,6 @@ # Since both lit and the python bindings use the same python interpreter, # we can just check whether yaml can be imported here and exclude if not. try: - import yaml + import yaml except ModuleNotFoundError: - config.unsupported = True + config.unsupported = True diff --git a/mlir/test/python/lit.local.cfg b/mlir/test/python/lit.local.cfg --- a/mlir/test/python/lit.local.cfg +++ b/mlir/test/python/lit.local.cfg @@ -1,4 +1,4 @@ -config.environment['ASAN_OPTIONS'] = 'detect_leaks=0' +config.environment["ASAN_OPTIONS"] = "detect_leaks=0" if not config.enable_bindings_python: - config.unsupported = True -config.excludes.add('python_test_ops.td') + config.unsupported = True +config.excludes.add("python_test_ops.td") diff --git a/mlir/test/tblgen-lsp-server/lit.local.cfg b/mlir/test/tblgen-lsp-server/lit.local.cfg --- a/mlir/test/tblgen-lsp-server/lit.local.cfg +++ b/mlir/test/tblgen-lsp-server/lit.local.cfg @@ -1 +1 @@ -config.excludes = ['include'] +config.excludes = ["include"]