[tools] Parallelize tools/clang_format_new.py#34750
[tools] Parallelize tools/clang_format_new.py#34750SplitInfinity wants to merge 1 commit intopytorch:masterfrom
Conversation
|
Uhh, I must be doing something weird because I'm seeing this in the regular, non-diff mode: |
💊 CircleCI build failures summary and remediationsAs of commit 5d7320c (more details on the Dr. CI page):
🕵️ 2 new failures recognized by patternsThe following build failures do not appear to be due to upstream breakages:
|
|
ready for review? |
|
Yes. There is that one warning I couldn't figure out how to address. I think it's |
|
this is my output when I run: https://gist.github.com/suo/47015d5b20c35799d1571a91125faf45 |
|
What do you see when you run with For some reason I don't see that on my end but it looks like there are too many processes being created. I guess it makes sense to cap the maximum number of subprocesses? |
|
yeah, using a semaphore works. Your other warning is because you don't call |
suo
left a comment
There was a problem hiding this comment.
going to request changes to clear this from my queue
da6bea0 to
0a78470
Compare
|
Summary: This commit parallelizes the invocation of clang-format on all files in tools/clang_format_new.py using asyncio. Testing: Ran and timed the script.
0a78470 to
5d7320c
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@SplitInfinity has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@SplitInfinity merged this pull request in 2a1c838. |
Summary: **Summary** This commit parallelizes the invocation of `clang-format` on all files in `tools/clang_format_new.py` using `asyncio`. **Testing** Ran and timed the script. *Before* ``` $ time ./tools/clang_format_new.py --diff ... real 0m7.615s user 0m6.012s sys 0m1.634s ``` *After* ``` $ time ./tools/clang_format_new.py --diff ... Some files not formatted correctly real 0m2.156s user 0m8.488s sys 0m3.201s ``` Pull Request resolved: pytorch#34750 Differential Revision: D20523133 Pulled By: SplitInfinity fbshipit-source-id: 509741a0b4fcfcdcd7c5a45654e3453b4874d256
Summary
This commit parallelizes the invocation of
clang-formaton all filesin
tools/clang_format_new.pyusingasyncio.Testing
Ran and timed the script.
Before
After