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

Remove build-time codegen using Python #620

Conversation

ChrisCummins
Copy link
Contributor

@ChrisCummins ChrisCummins commented Mar 10, 2022

In bazel, build-time and package code can be mixed freely. For CMake, this build-time code needs to be split into a separate package to prevent headaches and workarounds, such as those that @sogartar had to land for #498.

This PR does a couple of things:

  1. It splits the code that is used at build time into a subdirectory of /build_tools, removing it from the compiler_gym namespace.
  2. It changes the build to use the code that is generated by (1), rather running the /build_tools scripts at build time.

The reason I chose to make the above change is that the build-time code that is generated changes only when the version of LLVM that CompilerGym is built against changes, and currently we only support a single version of LLVM. When adapting the code to different versions of LLVM, it is actually easier to hack on the generated code. We may need to revisit this when we progress on #568.

Fixes #600.

@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 Mar 10, 2022
@ChrisCummins ChrisCummins force-pushed the feature/600-build-time-codegen branch from 2f70250 to 1989b07 Compare March 10, 2022 16:20
@ChrisCummins ChrisCummins force-pushed the feature/600-build-time-codegen branch from 67e08ab to 3c619ca Compare March 10, 2022 16:30
@ChrisCummins ChrisCummins merged commit 4ca7f19 into facebookresearch:development Mar 10, 2022
@ChrisCummins ChrisCummins deleted the feature/600-build-time-codegen branch March 10, 2022 16:31
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.

Split the build-time code out of compiler_gym package.
2 participants