-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add support for building CompilerGym using CMake #506
Comments
General question for @sogartar and @KyleHerndon, is it on your roadmap to add macOS support to the CMake build? Cheers, |
@ChrisCummins, we are planing to add it after we add the MLIR env. So it will be in a few weeks. |
Awesome, thanks! I'll add a progress list to this task. I don't think the examples or benchmarks directories will be too challenging as they don't have a lot of compiled code Cheers, |
@sogartar, is it possible to configure the CMake build to use a local copy of LLVM? Let's say I have a fork of LLVM and have arranged it with the following directory: ~/llvm/build # cmake build dir
~/llvm/src # sources
~/llvm/install # install target
~/CompilerGym # CompilerGym From looking through the CMake configs it looks like the only control I have over the LLVM version used is Cheers, |
The use cases I would like to support with this are:
I'm happy to help contribute towards this if you give me a couple of pointers on how to start. |
The
Some packages provide custom Currently there is no way to specify an external LLVM source to be included in the super-build. I see now that this may be a problem, since we need the LLVM source code also during the build, which may crate a mismatch of versions. This piece would need refactoring. |
Thanks for the details. I have tried: $ cmake ... -DCOMPILER_GYM_LLVM_PROVIDER=external -DLLVM_DIR=/path/to/my/llvm But I found that
The LLVM sources are only needed by the scripts in this dir to extract the list of passes and generate a couple of .h/.py files. One workaround could be to split this out from the regular build by committing the generated files for whatever version of LLVM we build against. That way we don't need the LLVM sources, and users could run these scripts to generate their own files against a different version of LLVM should they wish (cf #568). Cheers, |
There may be some other problem but according to https://llvm.org/docs/CMake.html |
In build_external_cmake_project the install dir is added to |
Thanks. I was able to fix this by replacing this with just:
I'm working on a conditional if/else block depending on COMPILER_GYM_LLVM_PROVIDER like here but am still figuring out how cmake works :) There are some other issues like conflicting gtest definitions. Cheers, |
@sogartar, @kylescotshank, @mostafaelhoushi, I've created a new project to track the various tasks needed to fully migrate from Bazel to CMake. I'll split the list of tasks here into individual issues that can be tracked and discussed separately. Closing this in favor of tracking progress on the project page. Cheers, |
🚀 Feature
This is a tracking issue for the progress that @KyleHerndon and @sogartar have made on adding support for building CompilerGym using CMake.
The initial discussions and plan were outlined in the comments of this PR #478.
Progress:
examples/
benchmarks/
TODO(github.com/facebookresearch/CompilerGym/issues/506)
issues in the source.The text was updated successfully, but these errors were encountered: