This is an archive of the discontinued LLVM Phabricator instance.

[mlgo] Skip AOT-compiling a model if a header/object pair is provided
ClosedPublic

Authored by mtrofin on Apr 6 2021, 2:09 PM.

Details

Summary

This allows one to cross-compile the header/object for a model in a
setup where the compiler is built on a system that cannot host the AOT
compiler. For example, if arm-hostable clang is desired, while the AOT
Tensorflow compiler can cross-compile to arm, it can't currently run on
arm.

The only alternative in that scenario would be to cross-compile clang
itself, but that gets complicated when trying to run tests after that.

Diff Detail

Event Timeline

mtrofin created this revision.Apr 6 2021, 2:09 PM
mtrofin requested review of this revision.Apr 6 2021, 2:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 2:09 PM
phosek accepted this revision.Apr 12 2021, 9:20 PM

LGTM

llvm/cmake/modules/TensorFlowCompile.cmake
23–24

Super minor nit, I'd make these variables lowercase as a signal to the reader that these are local variables.

This revision is now accepted and ready to land.Apr 12 2021, 9:20 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked an inline comment as done.

addressed nit and submitted. thanks!