This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Tunnel LLVM_USE_LINKER through to the standalone example build.
ClosedPublic

Authored by stellaraccident on May 27 2022, 8:19 PM.

Details

Summary

When building in debug mode, the link time of the standalone sample is excessive, taking upwards of a minute if using BFD. This at least allows lld to be used if the main invocation was configured that way. On my machine, this gets a standalone test that requires a relink to run in ~13s for Debug mode. This is still a lot, but better than it was. I think we may want to do something about this test: it adds a lot of latency to a normal compile/test cycle and requires a bunch of arg fiddling to exclude.

I think we may end up wanting a check-mlir-heavy target that can be used just prior to submit, and then make check-mlir just run unit/lite tests. More just thoughts for the future (none of that is done here).

Diff Detail

Event Timeline

stellaraccident requested review of this revision.May 27 2022, 8:19 PM
bondhugula accepted this revision.May 27 2022, 10:22 PM

This is a great improvement - thanks!

This revision is now accepted and ready to land.May 27 2022, 10:22 PM

Nice. Would integration go to heavy then or still be separate? (I was even wondering if this test should be considered an integration test, and indeed this one is quite slow while not providing much signal, but we do want to make sure this flow isn't broken)

mehdi_amini accepted this revision.May 29 2022, 2:14 AM
mehdi_amini added inline comments.
mlir/test/Examples/standalone/test.toy
4

Can we remove the ; \ at the end here?

comments and rebase

stellaraccident marked an inline comment as done.Jun 5 2022, 12:32 PM

Nice. Would integration go to heavy then or still be separate? (I was even wondering if this test should be considered an integration test, and indeed this one is quite slow while not providing much signal, but we do want to make sure this flow isn't broken)

I think we should followup and get this test out of the main edit/test loop. I'm not going to do that in this patch.

This revision was landed with ongoing or failed builds.Jun 5 2022, 12:36 PM
This revision was automatically updated to reflect the committed changes.
fdeazeve added a subscriber: fdeazeve.EditedJun 6 2022, 5:27 AM

Out of curiosity, were build bots failing on this test due to timeouts?

I've just seen a failure on a build that includes this commit (for example https://reviews.llvm.org/D127078), and git logs led me here.

Idk - I haven't seen the failures. It passed presubmit Benoit I landed (phab says it didn't because I did a trivial rebase/addressed comments right before).

Idk - I haven't seen the failures. It passed presubmit Benoit I landed (phab says it didn't because I did a trivial rebase/addressed comments right before).

Got it, thanks! I will re-run the build on that review to check if the timeout is consistent