use_installed=False,
)
+ if config.arm_emulator_mlir_cpu_runner_executable:
+ mcr_cmd = config.arm_emulator_mlir_cpu_runner_executable
+ else:
+ # Top-level LIT config adds llvm_tools_dir to PATH but this is lost
+ # when running under an emulator. If the user didn't specify an
+ # mlir-cpu-runner executable, use absolute path
+ # %llvm_tools_dir/mlir-cpu-runner.
+ mcr_cmd = llvm_config.use_llvm_tool(
+ "mlir-cpu-runner",
+ search_env="MLIR_CPU_RUNNER",
+ required=True,
+ search_paths=[config.mlir_tools_dir],
+ use_installed=False,
+ )
+
# Run test in emulator (qemu or armie)
emulation_cmd = (
f"{config.arm_emulator_executable} {config.arm_emulator_options}"
)
- if config.arm_emulator_mlir_cpu_runner_executable:
- mcr_cmd = config.arm_emulator_mlir_cpu_runner_executable
-
lli_cmd = f"{emulation_cmd} {lli_cmd}"
mcr_cmd = f"{emulation_cmd} {mcr_cmd}"