This is an archive of the discontinued LLVM Phabricator instance.

[SPEC2017] Fix image_validator build when cross-compiling.
ClosedPublic

Authored by fhahn on Jan 25 2021, 6:36 AM.

Details

Summary

When cross-compiling and running benchmarks on a different device,
verification happens on-device, but currently the image validator
binaries are built for the host system.

This breaks verification, because the host binary cannot necessarily be
executed on-device (e.g. cross-compiling for ARM64 on X86 and executing
on a ARM64 device).

I tested this with cross-compiling to ARM64 and it works as expected.
When not cross-compiling, the behavior should not change.

Event Timeline

fhahn created this revision.Jan 25 2021, 6:36 AM
fhahn requested review of this revision.Jan 25 2021, 6:36 AM
Meinersbur accepted this revision.Jan 25 2021, 7:39 AM

Thank you. May have been forgotten from D51080/D61597

This revision is now accepted and ready to land.Jan 25 2021, 7:39 AM

Like fpcmp. maybe call the validator ${VALIDATOR}-target. Host and target executables exist for fpcmp and at this point I am not sure why.

fhahn updated this revision to Diff 319300.Jan 26 2021, 7:59 AM

Add -target suffix.

fhahn added a comment.Jan 26 2021, 8:01 AM

Like fpcmp. maybe call the validator ${VALIDATOR}-target. Host and target executables exist for fpcmp and at this point I am not sure why.

Not sure about fcmp, it seems like only the -target one should be needed. timeit also has target and host versions, but I think those are needed, as we also run timeit on the host to measure compile-time. I added the -target suffix to the image validate target

This revision was automatically updated to reflect the committed changes.

Not sure about fcmp, it seems like only the -target one should be needed. timeit also has target and host versions, but I think those are needed, as we also run timeit on the host to measure compile-time. I added the -target suffix to the image validate target

At the time I added the SPEC 2017 files, I copied the approach taken for fpcmp, and It think at that time the VERIFY: lines were meant to be executed on the host (executing the RUN: via the TEST_SUITE_REMOTE_CLIENT option). Things have changed since them and since I used fpcmp as a template, the validator should follow its changes.

Thanks for taking a look!