-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace subprocess::Popen() with boost::process #398
Merged
ChrisCummins
merged 13 commits into
facebookresearch:development
from
ChrisCummins:fix-llvm-runtime-slowdown
Sep 17, 2021
Merged
Replace subprocess::Popen() with boost::process #398
ChrisCummins
merged 13 commits into
facebookresearch:development
from
ChrisCummins:fix-llvm-runtime-slowdown
Sep 17, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Sep 15, 2021
ChrisCummins
force-pushed
the
fix-llvm-runtime-slowdown
branch
from
September 15, 2021 20:46
2a8c741
to
e3d8ee6
Compare
ChrisCummins
force-pushed
the
fix-llvm-runtime-slowdown
branch
from
September 16, 2021 08:16
ee1bf91
to
e3ccc75
Compare
ChrisCummins
changed the title
🏗️ WIP: Replace subprocess::Popen() with boost::process
Replace subprocess::Popen() with boost::process
Sep 16, 2021
ChrisCummins
force-pushed
the
fix-llvm-runtime-slowdown
branch
from
September 16, 2021 08:30
7955423
to
5baf885
Compare
This was referenced Sep 16, 2021
ChrisCummins
force-pushed
the
fix-llvm-runtime-slowdown
branch
from
September 17, 2021 08:59
7818118
to
2c636d7
Compare
The subprocess::Popen() library function was found to slow down when called in a tight loop thousands of times. This patch reimplements the compiler_gym::util::checkOutput() function to use boost::process rather than subprocess::Popen. On a test bench, the runtimes of this new implementation have been found to be stable after ~50k runs. Fixes facebookresearch#393.
This is similar to checkCall() except that it copies the stdout to a string output parameter.
This creates a new Command protocol buffer that encapsulates all of the details for running a single command. The Subprocess.h header has been updated with a new class to use this proto buffer.
The coverage workflow has been integrated into the new CI workflow.
This is a clumsy workaround that simply disables the timeout check on macOS, so that RPC timeouts are required to enforce timeouts. Issue facebookresearch#399.
ChrisCummins
force-pushed
the
fix-llvm-runtime-slowdown
branch
from
September 17, 2021 09:41
2c636d7
to
935b8cc
Compare
This was referenced Sep 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch set:
subprocess
library with an implementation usingboost::process
, assubprocess:Popen()
was found to slow down over time (Taking Runtime observation repeatedly gets slower over time #393).Command
protocol buffer that encapsulates all of the information needed to run a command locally on a machine:compiler_gym/util/Subprocess.h
to add support this newCommand
message type.LlvmEnv.runtime_warmup_runs_count
property that is used to specify a number of runs of a binary to make before the times runs for Runtime observations ([llvm] Add support for optimizing for runtime #370).BenchmarkDynamicConfig
protocol buffer to use the newCommand
message types ([llvm] Add support for optimizing for runtime #370).Fixes #393.