This is an archive of the discontinued LLVM Phabricator instance.

[Docs] Mention how to run lit tests in parallel
AbandonedPublic

Authored by xgupta on Jul 21 2021, 9:43 PM.

Details

Summary

make check-llvm -jN doesn't seems to control workers. So incase someone want to use their cpu
threads, these commands can help them. Thanks Raphael (teemperor) for suggesting this.

Diff Detail

Event Timeline

xgupta requested review of this revision.Jul 21 2021, 9:43 PM
xgupta created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 9:43 PM
mehdi_amini requested changes to this revision.Jul 21 2021, 10:34 PM
mehdi_amini added a subscriber: mehdi_amini.
mehdi_amini added inline comments.
llvm/docs/TestingGuide.rst
186

Isn't lit running in parallel by default?
ninja check spawn as many workers as core on my machine...

$ ./bin/llvm-lit ../mlir/test
-- Testing: 1036 tests, 96 workers --
This revision now requires changes to proceed.Jul 21 2021, 10:34 PM
teemperor added inline comments.
llvm/docs/TestingGuide.rst
186

I think this patch is trying to document how to limit the number of workers on a machine to something less than the number of hardware threads. At least the description says that this is based on some suggestion of mine and the last time I commented on anything related to LIT_OPTS was when I told someone on the Discord's 'beginner' channel how to make lit only run tests on one core (please correct me if I got that wrong @xgupta ).

The current way the patch is formulating this makes it actually sound like parallelism in lit is opt-in, so I think that could be rephrased.

I also wonder how useful this information actually is as I don't think many people care about limiting the number of test threads. We already point to the lit docs which document all of this, but maybe we should just briefly mention LIT_OPTS as a quick way to configure lit? We could have export LIT_OPTS="-j1" as an example then.

xgupta abandoned this revision.Jul 22 2021, 3:25 AM

Oops I missed the point. Then I agree with @teemperor, this information is not useful for many users if the option is only to limit the threads.