Lines Matching full:config
20 config.name = "MLIR"
32 config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
35 config.suffixes = [
49 config.test_source_root = os.path.dirname(__file__)
52 config.test_exec_root = os.path.join(config.mlir_obj_root, "test")
54 config.substitutions.append(("%PATH%", config.environment["PATH"]))
55 config.substitutions.append(("%shlibext", config.llvm_shlib_ext))
56 config.substitutions.append(("%llvm_src_root", config.llvm_src_root))
57 config.substitutions.append(("%mlir_src_root", config.mlir_src_root))
58 config.substitutions.append(("%host_cxx", config.host_cxx))
59 config.substitutions.append(("%host_cc", config.host_cc))
68 config.llvm_shlib_dir, f"{prefix}{name}{config.llvm_shlib_ext}"
85 if not "asan" in config.available_features:
88 if "Darwin" in config.host_os:
91 subprocess.check_output([config.host_cc.strip(), "-print-resource-dir"])
98 if "Linux" in config.host_os:
102 config.host_cxx.strip(),
103 f"-print-file-name=libclang_rt.asan-{config.host_arch}.so",
124 copied_python = os.path.join(config.mlir_obj_root, "copied-python")
134 config.python_executable,
172 config.excludes = [
183 llvm_config.with_environment("PATH", config.mlir_tools_dir, append_path=True)
184 llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
186 tool_dirs = [config.mlir_tools_dir, config.llvm_tools_dir]
214 if config.enable_vulkan_runner:
217 if config.enable_rocm_runner:
220 if config.enable_cuda_runner:
223 if config.enable_sycl_runner:
226 if config.enable_spirv_cpu_runner:
229 if config.mlir_run_arm_sve_tests or config.mlir_run_arm_sme_tests:
232 if config.mlir_run_arm_sme_tests:
233 config.substitutions.append(
237 config.arm_sme_abi_routines_shlib or find_runtime("mlir_arm_sme_abi_stubs"),
255 ToolSubst("%mlir_lib_dir", config.mlir_lib_dir, unresolved="ignore"),
256 ToolSubst("%mlir_src_dir", config.mlir_src_root, unresolved="ignore"),
260 python_executable = config.python_executable
263 if "asan" in config.available_features:
264 if "Linux" in config.host_os:
266 f"env LD_PRELOAD={get_asan_rtlib()} {config.python_executable}"
268 if "Darwin" in config.host_os:
276 python_executable, config.python_executable
282 config.environment["MallocNanoZone"] = "0"
283 config.environment["ASAN_OPTIONS"] = "detect_stack_use_after_return=1"
284 config.environment["DYLD_INSERT_LIBRARIES"] = asan_rtlib
288 # This is the equivalent of how %python is setup in llvm/utils/lit/lit/llvm/config.py.
289 elif "Windows" in config.host_os:
312 config.environment["FILECHECK_OPTS"] = "-enable-var-scope --allow-unused-prefixes=false"
318 if config.enable_bindings_python:
319 config.environment["PYTHONPATH"] = os.getenv("MLIR_LIT_PYTHONPATH", "")
323 os.path.join(config.mlir_obj_root, "python_packages", "mlir_core"),
324 os.path.join(config.mlir_obj_root, "python_packages", "mlir_test"),
329 if config.enable_assertions:
330 config.available_features.add("asserts")
332 config.available_features.add("noasserts")
336 mlir_runner_exe = lit.util.which("mlir-runner", config.mlir_tools_dir)
357 config.available_features.add("host-supports-jit")
359 if config.run_nvptx_tests:
360 config.available_features.add("host-supports-nvptx")
362 if config.run_rocm_tests:
363 config.available_features.add("host-supports-amdgpu")
365 if config.arm_emulator_executable:
366 config.available_features.add("arm-emulator")