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

Create Example Repo that Extends Compiler Gym #532

Open
mostafaelhoushi opened this issue Jan 1, 2022 · 7 comments
Open

Create Example Repo that Extends Compiler Gym #532

mostafaelhoushi opened this issue Jan 1, 2022 · 7 comments
Assignees
Labels
Documentation Improvements or additions to documentation Enhancement New feature or request

Comments

@mostafaelhoushi
Copy link
Contributor

mostafaelhoushi commented Jan 1, 2022

🚀 Feature

Create a standalone repo that import compiler_gym and extends it by defining a new environment

Motivation

We want CompilerGym to be a tool for everyone to create their own environments. Currently we have examples within the repo that may require modifying the build of CompilerGym. Ideally we want to show how users can create their own environments "out-of-tree".

Pitch

We can create an example in a standalone repo (perhaps under someone's personal GitHub account) and have a section in CompilerGym documentation or README with out-of-tree examples (that define separate environments but perhaps also that define their own benchmarks, extending existing environments with their own observations/rewards/actions, RL training scripts, auto-tuning scripts, etc.)

Alternatives

We may consider the "CompilerGym-examples" repo that was created for the paper.

We can also consider something like Pytorch's examples repo: https://github.com/pytorch/examples/

Additional context

N/A

@mostafaelhoushi mostafaelhoushi added the Enhancement New feature or request label Jan 1, 2022
@ChrisCummins
Copy link
Contributor

I ❤️ this idea. I would suggest keeping the scope of the standalone repo fairly constrained to just demoing a new environment and calling it CompilerGymEnvironmentExample or something.

If we were to move everything from examples/ into a separate repo (which would almost be possible after #428 except for a couple of bits that need to be built with cmake/bazel) then I imagine that the CI config gets a lot more confusing when testing across two repos and that breaking changes / refactors can be a bit of a headache when two repos need to move in lockstep. What do you think?

I agree that a personal GitHub account is probably the way to go here. We can link to it from here.

Cheers,
Chris

@mostafaelhoushi
Copy link
Contributor Author

I ❤️ this idea. I would suggest keeping the scope of the standalone repo fairly constrained to just demoing a new environment and calling it CompilerGymEnvironmentExample or something.

If we were to move everything from examples/ into a separate repo (which would almost be possible after #428 except for a couple of bits that need to be built with cmake/bazel) then I imagine that the CI config gets a lot more confusing when testing across two repos and that breaking changes / refactors can be a bit of a headache when two repos need to move in lockstep. What do you think?

I agree that a personal GitHub account is probably the way to go here. We can link to it from here.

Cheers, Chris

Yes, I agree we shouldn't move the examples. I was thinking of keeping the examples directory as is and perhaps add to the README.md file in the examples a directory a link to a single external repo for now, and hopefully as time goes on more members of the community will create their own extensions that we may add their links as well.

@ChrisCummins
Copy link
Contributor

Sounds good! Do you want to take the lead on this?

Cheers,
Chris

@mostafaelhoushi mostafaelhoushi self-assigned this Jan 12, 2022
@mostafaelhoushi
Copy link
Contributor Author

Sure. I just assigned it to myself.

@ChrisCummins
Copy link
Contributor

Brill, thanks!

@mostafaelhoushi
Copy link
Contributor Author

I imagine that the CI config gets a lot more confusing when testing across two repos and that breaking changes / refactors can be a bit of a headache when two repos need to move in lockstep. What do you think?

I suggest to create an examples repo like PyTorch https://github.com/pytorch/examples, and it could have its own CI that will test using pip install compiler_gym rather than having to build the development branch of CompilerGym.

Basically, CompilerGym repo CI shouldn't run the examples repo's CI. We only run the examples repo CI when we want to create a new release.

@ChrisCummins
Copy link
Contributor

I like the sound of that!

We only run the examples repo CI when we want to create a new release.

It's not super clear how to do that. One way (I think) of achieving this would be to add a manual trigger to the examples CI workflow, where you can enter in flags to append to the pip install compiler_gym setup step. That way we can upload a pre-release wheel of CompilerGym to pypi's testing repository, and run the examples CI against that, before releasing proper.

Cheers,
Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants