[PATCH] D28789: [lit] Support sharding testsuites, for parallel execution.

Daniel Dunbar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 14:01:45 PST 2017

ddunbar added inline comments.

Comment at: utils/lit/lit/main.py:436
+                            shard_begin+1, shard_end))
+            run.tests = run.tests[shard_begin:shard_end]
graydon wrote:
> ddunbar wrote:
> > Would it be better to shard in a round robin fashion? There is some tendency for tests to be clumped by where they are defined, and where they are defined to be (weakly) correlated with how long they take to run, so that would distribute long running tests across machines, which should help reduce the deviation between total testing time among shards.
> Considered it, but decided against based on the (possibly wrong) guess that the discovery-clumping order would have better locality in terms of what test-prerequisites are built, tested, and hot-in-cache. If you think round-robin will work better overall, I'm happy to change it.
What do you mean by test prerequisites? lit currently doesn't really do any shared work on a per-test basis that could be cached.

One other advantage of the current clumping is you are more likely to get deterministic assignments to machines, which is a blessing and a curse. The blessing means you won't have weird configuration changes that users might not think to check, the curse means you are less likely to shake such things out.

I'm ok with the current patch unless you feel swayed the other direction.


More information about the llvm-commits mailing list