Skip to content
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

Release v0.2.1 #490

Merged
merged 283 commits into from
Nov 18, 2021
Merged

Release v0.2.1 #490

merged 283 commits into from
Nov 18, 2021

Conversation

ChrisCummins
Copy link
Contributor

Highlights of this release include:

  • [Complex and composite action spaces] Added a new schema for describing action spaces (#369). This complete overhaul enables a much richer set of actions to be exposed, such as composite actions spaces, dictionaries, and continuous actions.
  • [State Transition Dataset] We have released the first iteration of the state transition dataset, a large collection of (state,action,reward) tuples for the LLVM environments, suitable for large-scale supervised learning. We have added an example learned cost model using a graph neural network in examples/gnn_cost_model (#484, thanks @bcui19!).
  • [New examples] We have added several new examples to the examples/ directory, including a new loop unrolling demo based on LLVM (#477, thanks @mostafaelhoushi!), a loop tool demo (#457, thanks @bwasti!), micro-benchmarks for operations, and example reinforcement learning scripts (#484). See examples/README.md for details. We also overhauled the example compiler gym service (#467).
  • [New logo] Thanks Christy for designing a great new logo for CompilerGym! (#471)
  • [llvm] Added a new Bitcode observation space (#442).
  • Numerous bug fixes and improvements.

Deprecations and breaking changes:

  • [Breaking change] Out-of-tree compiler services will require updating to the new action space API (#369).
  • The env.observation.add_derived_space() method has been deprecated and will be removed in a future release. Please use the new derived_observation_spaces argument to the CompilerEnv constructor (#463).
  • The compiler_gym.utils.logs module has been deprecated. Use compiler_gym.utils.runfiles_path instead (#453).
  • The compiler_gym.replay_search module has been deprecated and merged into the compiler_gym.random_search (#453).

ChrisCummins and others added 30 commits September 29, 2021 22:40
[ci] Don't fail CI jobs if code coverage upload fails.
[ci] Persist the bazel build cache.
[util] Increase persistence on "Too many Requests" errors.
Extend action spaces to be composable and continuous.
Using `npm ci` prevents npm from modifying the package.json and
package-lock.json files.
[ci] Add a CI job to build the nodejs frontend.
By default datasets are selected uniformly randomly in
Datasets.random_benchmark(). This means that datasets with a small
number of benchmarks will be overrepresented compared to datasets with
many benchmarks. To correct for this bias this patch adds a
weight_datasets_by_size argument which is equivalent to weighting the
dataset choice by the number of benchmarks in each dataset:

    >>> random.choices(datasets, weights=[len(p) for p in datasets])

Weighting the choice of datasets by their size means that datasets with
infinite sizes (such as random program generators) will be excluded from
sampling as their size is 0.

Fixes #422.
This patch adds a test that using fork() in a `with` statement works
as expected (i.e. the environment is closed at the end of the scope),
and refactors the unit tests to use this syntax.

Fixes #362.
This adds a set of tests for combinations of benchmarks and actions
that have been found to produce diverging states in forked
environments.
This moves the create_logs_dir() function into the runfile_path module
so that all of the functions for generating filesystem paths are in
the same module. This also improves the implementation by enabling
thread safe logging directory generation, and renames the function to
create_user_logs_dir() to better communicate the type of logs.
[datasets] Add a weighted implementation of random_benchmark().
[tests] Regression and unit tests for env.fork()
This aggregates the random search utility classes and functions into
the random_search module. This effectively deprecates the
compiler_gym.random_replay and compiler_gym.util.logs modules.
This replaces the per-object instances of loggers with a shared
per-module logger, accessed using logging.getLogger(__name__). The
idea is to improve the consistency of logging.
Always check the Python version and use terminate() on py < 3.7, and
always block until the process has actually terminated.
ChrisCummins and others added 22 commits November 16, 2021 15:04
Add custom LLVM unroller to enforce unrolling factors
Add scripts to replicate the experiments from arXiv:2109.08267v1
This is to reduce the risk of a pip-installed version of CompilerGym
from co-existing with the version installed by `make install`. This can
lead to the incorrect version being used and cryptic errors, for example
see #483.
Highlights of this release include:

- [Complex and composite action spaces] Added a new schema for
describing action spaces. This complete overhaul enables a much richer
set of actions to be exposed, such as composite actions spaces,
dictionaries, and continuous actions.

- [State Transition Dataset] We have released the first iteration of
the state transition dataset, a large collection
of (state,action,reward) tuples for the LLVM environments, suitable
for large-scale supervised learning. We have added an example learned
cost model using a graph neural network in examples/gnn_cost_model,
(thanks @bcui19!).

- [New examples] We have added several new examples to the examples/
directory, including a new loop unrolling demo based on LLVM, (thanks
@mostafaelhoushi!), a loop tool demo (thanks @bwasti!),
micro-benchmarks for operations, and example reinforcement learning
scripts. See `examples/README.md` for details. We also overhauled the
example compiler gym service.

- [New logo] Thanks Christy for designing a great new logo for CompilerGym!

- [llvm] Added a new Bitcode observation space.

- Numerous bug fixes and improvements.

Deprecations and breaking changes:

- [Backend API change] Out-of-tree compiler services will require
updating to the new action space API.

- The env.observation.add_derived_space() method has been deprecated
and will be removed in a future release. Please use the new
derived_observation_spaces argument to the CompilerEnv constructor.

- The compiler_gym.utils.logs module has been deprecated. Use
compiler_gym.utils.runfiles_path instead.

- The compiler_gym.replay_search module has been deprecated and merged
into the compiler_gym.random_search.
@ChrisCummins ChrisCummins added this to the v0.2.1 milestone Nov 17, 2021
@facebook-github-bot 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 Nov 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #490 (f3e4a08) into stable (9002afc) will decrease coverage by 0.05%.
The diff coverage is 83.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           stable     #490      +/-   ##
==========================================
- Coverage   87.37%   87.32%   -0.06%     
==========================================
  Files         104      113       +9     
  Lines        5966     6397     +431     
==========================================
+ Hits         5213     5586     +373     
- Misses        753      811      +58     
Impacted Files Coverage Δ
compiler_gym/bin/random_replay.py 0.00% <0.00%> (ø)
compiler_gym/leaderboard/llvm_instcount.py 92.78% <ø> (-0.08%) ⬇️
compiler_gym/random_replay.py 0.00% <0.00%> (-100.00%) ⬇️
...ice/runtime/create_and_run_compiler_gym_service.py 100.00% <ø> (ø)
compiler_gym/spaces/reward.py 72.54% <ø> (ø)
compiler_gym/envs/llvm/datasets/cbench.py 77.44% <20.00%> (-1.71%) ⬇️
compiler_gym/service/connection.py 77.02% <38.09%> (-0.56%) ⬇️
compiler_gym/envs/gcc/datasets/csmith.py 92.04% <50.00%> (+0.09%) ⬆️
compiler_gym/envs/llvm/datasets/csmith.py 88.40% <50.00%> (+0.17%) ⬆️
...er_gym/third_party/inst2vec/inst2vec_preprocess.py 73.94% <50.00%> (-0.29%) ⬇️
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9002afc...f3e4a08. Read the comment docs.

@ChrisCummins ChrisCummins merged commit a89e520 into stable Nov 18, 2021
@ChrisCummins ChrisCummins deleted the release-v0.2.1 branch November 18, 2021 12:52
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants