This is an archive of the discontinued LLVM Phabricator instance.

[mlir][test] Add missing LIT config for `mlir-cpu-config` + emulator
ClosedPublic

Authored by awarzynski on Jul 21 2023, 12:40 AM.

Details

Summary

Similarly to when using lli, make sure that when using
mlir-cpu-runner with an emulator, a full path to mlir-cpu-runner is
used. Otherwise mlir-cpu-runner won't be found and you will get the
following error:

Error while loading mlir-cpu-runner: No such file or directory

This patch should fix:

The breakage was originally introduced in
https://reviews.llvm.org/D155405.

Diff Detail

Event Timeline

awarzynski created this revision.Jul 21 2023, 12:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2023, 12:40 AM
awarzynski requested review of this revision.Jul 21 2023, 12:40 AM

If it's easier, you can pass PATH to the emulated process:

-E var=value         QEMU_SET_ENV      sets targets environment variable (see below)

That's assuming you know at this point what the final PATH will be.

c-rhodes added inline comments.Jul 21 2023, 1:52 AM
mlir/test/Integration/lit.local.cfg
50

should this be mlir_tools_dir? Looks like it can be configured separately in CMake?

Mind you, that's QEMU specific and who knows what else is on PATH.

Replace config.llvm_tools_dir with config.mlir_tools_dir

Thanks Cullen!

c-rhodes accepted this revision.Jul 21 2023, 2:13 AM

LGTM cheers

This revision is now accepted and ready to land.Jul 21 2023, 2:13 AM
This revision was landed with ongoing or failed builds.Jul 21 2023, 2:21 AM
This revision was automatically updated to reflect the committed changes.