This is an archive of the discontinued LLVM Phabricator instance.

[Utils] Add an option to specify number of cores to use in creduce-clang-crash.py
ClosedPublic

Authored by zequanwu on Feb 19 2021, 4:17 PM.

Diff Detail

Event Timeline

zequanwu requested review of this revision.Feb 19 2021, 4:17 PM
zequanwu created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 4:17 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rnk added inline comments.Feb 22 2021, 11:14 AM
clang/utils/creduce-clang-crash.py
81

I think we should try to pick a good default here. I think we can do better than creduce's default of 4 or whatever it is. I think max(4, os.cpu_count() / 2) might be a good guess.

zequanwu updated this revision to Diff 325520.Feb 22 2021, 11:46 AM

Address comment, using max(4, multiprocessing.cpu_count() / 2) because os.cpu_count is not available in python2.

Address comment, using max(4, multiprocessing.cpu_count() / 2) because os.cpu_count is not available in python2.

We require py3 these days, so it's ok to assume it.

thakis accepted this revision.Feb 22 2021, 12:20 PM

But lgtm either way.

This revision is now accepted and ready to land.Feb 22 2021, 12:20 PM
rnk accepted this revision.Feb 22 2021, 12:43 PM

lgtm