Skip to content

Commit

Permalink
Merge pull request #490 from facebookresearch/release-v0.2.1
Browse files Browse the repository at this point in the history
Release v0.2.1
  • Loading branch information
ChrisCummins committed Nov 18, 2021
2 parents 9002afc + f3e4a08 commit a89e520
Show file tree
Hide file tree
Showing 280 changed files with 40,604 additions and 22,366 deletions.
7 changes: 7 additions & 0 deletions .github/actions/install-runtime-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ runs:
brew install zlib
fi
shell: bash

# DGL creates ~/.dgl on first run and I have found that this will fail
# if run from pytest / bazel. Suppress errors if DGL is not installed.
- name: Initialize DGL
run: |
python3 -c 'import dgl; print(dgl.__version__)' || true
shell: bash
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ jobs:
python -m pip install compiler_gym-*-manylinux*.whl
fi
- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Install test dependencies
run: python -m pip install -r examples/requirements.txt -r tests/requirements.txt

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Run the examples tests
run: make examples-test
91 changes: 48 additions & 43 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Persist the bazel cache
uses: actions/cache@v2
with:
path: ~/.cache/bazel/_bazel_runner
key: bazel-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('**/BUILD') }}
restore-keys: |
bazel-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}-
bazel-${{ runner.os }}-
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
Expand Down Expand Up @@ -43,6 +52,15 @@ jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Persist the bazel cache
uses: actions/cache@v2
with:
path: /private/var/tmp/_bazel_runner
key: bazel-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('**/BUILD') }}
restore-keys: |
bazel-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}-
bazel-${{ runner.os }}-
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
Expand Down Expand Up @@ -101,9 +119,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
test-macos:
needs: build-macos
runs-on: macos-latest
Expand Down Expand Up @@ -134,13 +149,10 @@ jobs:
run: python -m pip install -r tests/requirements.txt

- name: Run the test suite
run: make install-test-cov PYTEST_ARGS="--ignore tests/llvm --ignore tests/gcc"
run: make install-test-cov PYTEST_ARGS="--ignore tests/llvm --ignore tests/gcc --ignore tests/loop_tool"

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
test-llvm-env-linux:
needs: build-linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -175,9 +187,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
test-llvm-env-macos:
needs: build-macos
runs-on: macos-latest
Expand Down Expand Up @@ -212,9 +221,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
test-gcc-env-linux:
needs: build-linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -249,9 +255,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
test-gcc-env-linux-no-docker:
needs: build-linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -288,9 +291,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-gcc-env-macos:
needs: build-macos
Expand Down Expand Up @@ -327,9 +327,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-gcc-env-macos-no-docker:
needs: build-macos
Expand Down Expand Up @@ -361,9 +358,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-loop_tool-env-linux:
needs: build-linux
Expand Down Expand Up @@ -395,9 +389,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-loop_tool-env-macos:
needs: build-macos
Expand Down Expand Up @@ -434,9 +425,6 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-examples-linux:
needs: build-linux
Expand All @@ -461,20 +449,17 @@ jobs:
- name: Install wheel
run: python -m pip install *.whl

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Install test dependencies
run: python -m pip install -r examples/requirements.txt -r tests/requirements.txt

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Run the test suite
run: make examples-test

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

test-examples-macos:
needs: build-macos
Expand All @@ -499,20 +484,17 @@ jobs:
- name: Install wheel
run: python -m pip install *.whl

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Install test dependencies
run: python -m pip install -r examples/requirements.txt -r tests/requirements.txt

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Run the test suite
run: make examples-test

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true

build-asan-llvm-service:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -595,3 +577,26 @@ jobs:
ASAN_OPTIONS: detect_leaks=1
CC: clang
CXX: clang++

www-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [16]
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: www/frontends/compiler_gym/package-lock.json

- name: Build web frontend
run: make www-build
33 changes: 21 additions & 12 deletions .github/workflows/fuzz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,42 @@ on:

jobs:
fuzz:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [3.9]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
- name: Persist the bazel cache
uses: actions/cache@v2
with:
path: ~/.cache/bazel/_bazel_runner
key: bazel-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('**/BUILD') }}
restore-keys: |
bazel-${{ hashFiles('WORKSPACE') }}-
bazel-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
python-version: 3.9

- name: Install build dependencies
uses: ./.github/actions/install-build-dependencies

- name: Install
- name: Build and install Python wheel
run: make install
env:
CC: clang
CXX: clang++
BAZEL_OPTS: --batch
BAZEL_FETCH_OPTS: --config=ci
BAZEL_TEST_OPTS: --config=ci
BAZEL_BUILD_OPTS: --config=ci

- name: Install runtime dependencies
uses: ./.github/actions/install-runtime-dependencies

- name: Install test dependencies
run: python -m pip install -r tests/requirements.txt

- name: Test
- name: Fuzz test
run: FUZZ_TIME=600 make install-fuzz
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ py_library(
"//compiler_gym/service",
"//compiler_gym/service/runtime",
"//compiler_gym/spaces",
"//compiler_gym/util",
"//compiler_gym/util/flags",
"//compiler_gym/views",
],
)
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
## Release 0.2.1 (2021-11-17)

Highlights of this release include:

- **[Complex and composite action spaces]** Added a new schema for describing
action spaces
([#369](https://github.com/facebookresearch/CompilerGym/pull/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](https://github.com/facebookresearch/CompilerGym/pull/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](https://github.com/facebookresearch/CompilerGym/pull/477), thanks
@mostafaelhoushi!), a loop tool demo
([#457](https://github.com/facebookresearch/CompilerGym/pull/457), thanks
@bwasti!), micro-benchmarks for operations, and example reinforcement learning
scripts ([#484](https://github.com/facebookresearch/CompilerGym/pull/484)).
See `examples/README.md` for details. We also overhauled the example compiler
gym service
([#467](https://github.com/facebookresearch/CompilerGym/pull/467)).
- **[New logo]** Thanks Christy for designing a great new logo for CompilerGym!
([#471](https://github.com/facebookresearch/CompilerGym/pull/471))
- **[llvm]** Added a new `Bitcode` observation space
([#442](https://github.com/facebookresearch/CompilerGym/pull/442)).
- 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
([#369](https://github.com/facebookresearch/CompilerGym/pull/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](https://github.com/facebookresearch/CompilerGym/pull/463)).
- The `compiler_gym.utils.logs` module has been deprecated. Use
`compiler_gym.utils.runfiles_path` instead
([#453](https://github.com/facebookresearch/CompilerGym/pull/453)).
- The `compiler_gym.replay_search` module has been deprecated and merged into
the `compiler_gym.random_search`
([#453](https://github.com/facebookresearch/CompilerGym/pull/453)).


## Release 0.2.0 (2021-09-28)

This release adds two new compiler optimization problems to CompilerGym: GCC
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ authors:
- family-names: "Leather"
given-names: "Hugh"
title: "CompilerGym"
version: 0.2.0
date-released: 2021-09-28
version: 0.2.1
date-released: 2021-11-17
url: "https://github.com/facebookresearch/CompilerGym"
preferred-citation:
type: article
Expand Down
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ We actively welcome your pull requests.
[building from source](https://github.com/facebookresearch/CompilerGym/blob/development/INSTALL.md)
to set up your environment.
3. If you've added code that should be tested, add tests.
4. If you've changed APIs, update the [documentation](/docs/source).
4. If you've changed APIs, update the
[documentation](https://github.com/facebookresearch/CompilerGym/tree/development/docs/source).
5. Ensure the `make test` suite passes.
6. Make sure your code lints (see [Code Style](#code-style) below).
7. If you haven't already, complete the [Contributor License Agreement
Expand All @@ -60,8 +61,9 @@ and file a [Pull Request](#pull-requests). Please include:
2. A CSV file of your results. The
[compiler_gym.leaderboard](https://facebookresearch.github.io/CompilerGym/compiler_gym/leaderboard.html)
package provides utilities to help generate results using your agent.
3. A write-up of your approach. You may use the
[submission template](/leaderboard/SUBMISSION_TEMPLATE.md) as a guide.
3. A write-up of your approach. You may use the submission template
([leaderboard/SUBMISSION_TEMPLATE.md](https://github.com/raw/facebookresearch/CompilerGym/development/leaderboard/SUBMISSION_TEMPLATE.md))
as a guide.

Please make sure to update to the latest CompilerGym release prior to
submission. We do not require that you submit the source code for your approach,
Expand All @@ -86,8 +88,8 @@ is simple:

We use [pre-commit](https://pre-commit.com/) to ensure that code is formatted
prior to committing. Before submitting pull requests, please run pre-commit. See
the [config file](/.pre-commit-config.yaml) for installation and usage
instructions.
[INSTALL.md](https://github.com/facebookresearch/CompilerGym/blob/development/INSTALL.md)
for installation and usage instructions.

Other common sense rules we encourage are:

Expand Down
Loading

0 comments on commit a89e520

Please sign in to comment.