-
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
CompilerGym Release v0.2.0 #434
Merged
Merged
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
Replace the start/end/undo/step endpoints with a single "step" function that takes all of the variables needed to describe an environment state (then benchmark, reward signal, and full actions history). This replaces the session-based API which is error prone and hard to scale. Note that this new stateless API is only a proof-of-concept implementation, as on every "step" it replays an entire episode. In the future we will change this to maintain a pool of live environments that can be used to serve stateless API requests more efficiently.
Replace the start/end/undo/step endpoints with a single "step" function that takes all of the variables needed to describe an environment state (then benchmark, reward signal, and full actions history). This replaces the session-based API which is error prone and hard to scale. Note that this new stateless API is only a proof-of-concept implementation, as on every "step" it replays an entire episode. In the future we will change this to maintain a pool of live environments that can be used to serve stateless API requests more efficiently.
In addition to plotting reward history, the frontend also shows the trend of instcount and autophase features. This means that all_states=1 needs to return everything for that case.
merge chris commits
Release v0.1.10 (2021-09-08)
m4 is needed to build Csmith from source.
This patch improves the error reporting when computing an observation fails. First, if the service produces an unexpected number of observations, a ServiceError is raised, rather than the previous assertion. Second, if the environment reports that it has reached a terminal state, a ServiceError is raised, containing the error details produced by the environment.
Small documentation improvements for build dependencies
Improved error reporting from ObservationView.__getitem__().
This patch refactors the code pattern `try: ...; finally: env.close()` to instead use the `with gym.make(...):` pattern. This is preferred because it automatically handles calling `close()`.
Use `with` statement in place of try/finally for envs.
Regression introduced in #384.
[tests] Fix gym compatibility test.
This commit combines code from: Hugh Leather <hleather@fb.com> Chris Cummins <cummins@fb.com> It is mostly Hugh's work, with a small amount of fixes from Chris, and a couple of extra datasets. Issue #383.
Issue #383.
This can be useful for debugging services: $ COMPILER_GYM_DEBUG=4 python -m compiler_gym.bin.service --env=llvm-v0 --run_on_port=8000 Issue #318.
[loop_tool] Add integration and tests
This removes the `examples/` tests from the bazel build system. Instead, examples are tested by simply running pytest in the examples directory. The `make install-test` target still runs the examples tests. One exception is `examples/example_compiler_gym_service` which can only be run through bazel because of its use of compiled C++ code. Issue #412 will be used to track progress on this.
[ci] Add a codeql workflow for Python.
Add support for running CompilerGym environments from docker containers
Un-bazel-ify the examples
[env] Fix a bug in reset() failure handling.
Codecov Report
@@ Coverage Diff @@
## stable #434 +/- ##
==========================================
- Coverage 85.87% 80.23% -5.64%
==========================================
Files 87 104 +17
Lines 4757 5966 +1209
==========================================
+ Hits 4085 4787 +702
- Misses 672 1179 +507
Continue to review full report at Codecov.
|
This release adds two new compiler optimization problems to CompilerGym: GCC command line flag optimization and CUDA loop nest optimization. - [GCC] A new `gcc-v0` environment, authored by @hughleat, exposes the command line flags of GCC as a reinforcement learning environment. GCC is a production-grade compiler for C and C++ used throughout industry. The environment provides several datasets and a large, high dimensional action space that works on several GCC versions. For further details check out the reference documentation: https://facebookresearch.github.io/CompilerGym/envs/gcc.html - [loop_tool] A new `loop_tool-v0` environment, authored by @bwasti, provides an experimental intermediate representation of *n*-dimensional data computation that can be lowered to both CPU and GPU backends. This provides a reinforcement learning environment for manipulating nests of loop computations to maximize throughput. For further details check out the reference documentation: https://facebookresearch.github.io/CompilerGym/envs/loop_tool.html Other highlights of this release include: - [Docker] Published a chriscummins/compiler_gym docker image that can be used to run CompilerGym services in standalone isolated containers. - [LLVM] Fixed a bug in the experimental `Runtime` observation space that caused observations to slow down over time. - [LLVM] Added a new utility module to compute observations from bitcodes. - Overhauled the continuous integration services to reduce computational requirements by 59.4% while increasing test coverage. - Improved error reporting if computing an observation fails. - Changed the return type of compiler_gym.random_search() to a CompilerEnv. - Numerous other bug fixes and improvements. Many thanks to code contributors: @thecoblack, @bwasti, @hughleat, and @sahirgomez1!
We will be running the full CI workflow on every push / PR, so repeating every test on the build artifacts seems wasteful. Instead just run the examples tests.
8cc95e2
to
f511941
Compare
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 release adds two new compiler optimization problems to CompilerGym: GCC command line flag optimization and CUDA loop nest optimization.
gcc-v0
environment, authored by @hughleat, exposes the command line flags of GCC as a reinforcement learning environment. GCC is a production-grade compiler for C and C++ used throughout industry. The environment provides several datasets and a large, high dimensional action space that works on several GCC versions. For further details check out the reference documentation.loop_tool-v0
environment, authored by @bwasti, provides an experimental intermediate representation of n-dimensional data computation that can be lowered to both CPU and GPU backends. This provides a reinforcement learning environment for manipulating nests of loop computations to maximize throughput. For further details check out the reference documentation.Other highlights of this release include:
Runtime
observation space that caused observations to slow down over time (#398).compiler_gym.random_search()
to aCompilerEnv
(#387).Many thanks to code contributors: @thecoblack, @bwasti, @hughleat, and @sahirgomez1!