We can now use Python3. Let's use os.cpu_count() to cleanup this
helper.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Does the following mean that Python3 is now okay to use for lit?
https://lists.llvm.org/pipermail/llvm-dev/2020-December/147372.html
https://reviews.llvm.org/D93097
Didn't look at the diff, but there's already code in the tree that requires python3 (eg subprocess.DEVNULL in compiler-rt/test/lit.common.cfg.py). So that part is fine.
llvm/utils/lit/lit/util.py | ||
---|---|---|
117 | I'm comparing the following documentation:
It seems like SC_NPROCESSORS_ONLN is closer to len(os.sched_getaffinity(0)) than os.cpu_count(). I'm not familiar with these routines, so I might be misunderstanding. |
llvm/utils/lit/lit/util.py | ||
---|---|---|
117 | That's a good point. What we are really interested in is the number of usable cores. Changed function to the following: |
Looks like this broken a build http://green.lab.llvm.org/green/job/ZorgTests/49794/console
Not sure if that build should be updated to use python3, or this should be reverted
I'm comparing the following documentation:
It seems like SC_NPROCESSORS_ONLN is closer to len(os.sched_getaffinity(0)) than os.cpu_count(). I'm not familiar with these routines, so I might be misunderstanding.