This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Only build mlir-cpu-runner when the native arch is targeted
ClosedPublic

Authored by stella.stamenova on Jan 27 2022, 5:19 PM.

Details

Summary

mlir-cpu-runner has a dependency on ExecutionEngine which is only built for the native arch. So currently mlir-cpu-runner does not link correctly when the native arch is not targeted.

Diff Detail

Event Timeline

stella.stamenova requested review of this revision.Jan 27 2022, 5:19 PM
mehdi_amini accepted this revision.Jan 27 2022, 6:14 PM
mehdi_amini added inline comments.
mlir/tools/CMakeLists.txt
12

Should we detect the MLIRExecutionEngine target here instead?

This revision is now accepted and ready to land.Jan 27 2022, 6:14 PM
mlir/tools/CMakeLists.txt
12

We could. All the other parts of the project, such as the tests, pivot on the arch being present, so I made this check consistent, but either way makes sense. I would be tempted to change all the ones that use ExecutionEngine to check for the target if we made the change here.

mehdi_amini added inline comments.Jan 27 2022, 11:48 PM
mlir/tools/CMakeLists.txt
12

I guess either way is fine.