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.1.9 #288

Merged
merged 179 commits into from
Jun 3, 2021
Merged

Conversation

ChrisCummins
Copy link
Contributor

This release of CompilerGym focuses on backend extensibility and adds a bunch of new features to make it easier to add support for new compilers:

  • Adds a new CompilationSession class encapsulates a single incremental compilation session (#261).
  • Adds a common runtime for CompilerGym services that takes a CompilationSession subclass and handles all the RPC wrangling for you (#270).
  • Ports the LLVM service and example services to the new runtime (#277). This provides a net performance win with fewer lines of code.

Other highlights of this release include:

  • [Core API] Adds a new compiler_gym.wrappers module that makes it easy to apply modular transformations to CompilerGym environments without modifying the environment code (#272).
  • [Core API] Adds a new Datasets.random_benchmark() method for selecting a uniform random benchmark from one or more datasets (#247).
  • [Core API] Adds a new compiler_gym.make() function, equivalent to gym.make() (#257).
  • [LLVM] Adds a new IrSha1 observation space that uses a fast, service-side C++ implementation to compute a checksum of the environment state (#267).
  • [LLVM] Adds 12 new C programs from the CHStone benchmark suite (#284).
  • [LLVM] Adds the anghabench-v1 dataset and deprecated anghabench-v0 (#242).
  • Numerous bug fixes and improvements.

ChrisCummins and others added 30 commits April 30, 2021 18:42
anghabench-v1 uses an amended manifest, but is otherwise the same.
Reduce the depth of TOC and re-organize it so that we first include
instructions for installation, then for usage.
[README] Re-org the installation/usage structure.
Don't use the `env.benchmark` attribute, and use active writing
style.
Much of the imported inst2vec code is unused. This removes it.
…aset-fast-path

[datasets] Remove fast-path for TarDataset.installed check.
The v0.1.8 release removed the random benchmark selection from
CompilerGym environments when no benchmark was specified. If the user
wishes for random benchmark selection, they were required to roll
their own implementation. Randomly sampling from
env.dataset.benchmark_uris() is not always easy as the generator may
be infinite. For some datasets, e.g. Csmith, it is trivial to select
random benchmarks by generating random numbers within the range of
numeric seed values, but this is not obvious and the user shouldn't
have to figure this out for the simple case of uniform random
selection.

This adds a `random_benchmark()` method to the `Dataset` class which
allows uniform random benchmark selection, and a `random_benchmark()`
method to the `Datasets` class for sampling across datasets.

Issue facebookresearch#240.
…ad-code-prune

[third party] Prune dead code from inst2vec.
…hmark

[datasets] Add a random_benchmark() method.
The minimum supported Python version for CompilerGym is
3.6. Subclassing from object is only required for Python versions < 3.
Remove `object` subclasses from Python classes.
This is to mitigate infrequent errors during server initialization of
bazel.
Rather than running most tests on bazel and a couple using pytest,
instead run most tests using pytest and a couple on bazel. The idea is
that install-test is often quicker than bazel, and provides an
execution environment closer to that of `pip install` users.
Run a smaller number of tests on the CI runners.
@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 Jun 3, 2021
This release of CompilerGym focuses on **backend extensibility** and
adds a bunch of new features to make it easier to add support for new
compilers:

- Adds a new `CompilationSession` class encapsulates a single
incremental compilation session.

- Adds a common runtime for CompilerGym services that takes a
`CompilationSession` subclass and handles all the RPC wrangling for
you.

- Ports the LLVM service and example services to the new runtime. This
provides a net performance win with fewer lines of code.

Other highlights of this release include:

- [Core API] Adds a new `compiler_gym.wrappers` module that makes it
easy to apply modular transformations to CompilerGym environments
without modifying the environment code.

- [Core API] Adds a new `Datasets.random_benchmark()` method for
selecting a uniform random benchmark from one or more datasets.

- [Core API] Adds a new `compiler_gym.make()` function, equivalent to
`gym.make()`.

- [LLVM] Adds a new `IrSha1` observation space that uses a fast,
service-side C++ implementation to compute a checksum of the
environment state.

- [LLVM] Adds 12 new C programs from the CHStone benchmark suite.

- [LLVM] Adds the `anghabench-v1` dataset and deprecated
`anghabench-v0`.

- Numerous bug fixes and improvements.
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2021

Codecov Report

Merging #288 (fe7ff19) into stable (e53ad52) will increase coverage by 18.72%.
The diff coverage is 78.29%.

❗ Current head fe7ff19 differs from pull request most recent head 1584b28. Consider uploading reports for the commit 1584b28 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           stable     #288       +/-   ##
===========================================
+ Coverage   63.73%   82.45%   +18.72%     
===========================================
  Files          77       87       +10     
  Lines        5565     4760      -805     
===========================================
+ Hits         3547     3925      +378     
+ Misses       2018      835     -1183     
Impacted Files Coverage Δ
compiler_gym/bin/manual_env.py 80.79% <0.00%> (ø)
compiler_gym/service/proto/__init__.py 100.00% <ø> (ø)
compiler_gym/spaces/__init__.py 100.00% <ø> (ø)
compiler_gym/spaces/named_discrete.py 94.73% <ø> (ø)
...er_gym/third_party/inst2vec/inst2vec_preprocess.py 74.23% <ø> (+58.34%) ⬆️
compiler_gym/third_party/inst2vec/rgx_utils.py 86.53% <ø> (+20.82%) ⬆️
...mpiler_gym/service/runtime/compiler_gym_service.py 22.00% <22.00%> (ø)
compiler_gym/third_party/llvm/__init__.py 96.15% <50.00%> (+0.15%) ⬆️
compiler_gym/service/compilation_session.py 64.70% <64.70%> (ø)
compiler_gym/service/connection.py 74.02% <70.83%> (-0.89%) ⬇️
... and 58 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 e53ad52...1584b28. Read the comment docs.

@ChrisCummins ChrisCummins merged commit ba182a4 into facebookresearch:stable Jun 3, 2021
@ChrisCummins ChrisCummins deleted the release-v0.1.9 branch June 3, 2021 23:48
@ChrisCummins ChrisCummins added this to Shipped in CompilerGym roadmap Jul 20, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants