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

Speedup CMake Configuration #595

Open
mostafaelhoushi opened this issue Mar 3, 2022 · 3 comments
Open

Speedup CMake Configuration #595

mostafaelhoushi opened this issue Mar 3, 2022 · 3 comments
Labels
Enhancement New feature or request Testing & Tooling Tests, tooling, and build systems

Comments

@mostafaelhoushi
Copy link
Contributor

🚀 Feature

Speedup CMake Configuration Step

Motivation

Everytime we update a CMakeLists.txt file, cmake build/configuration takes a really long time. Probably, it has to re-run the entire configuration, and that means rebuilding LLVM and a bunch of stuff from source.

Pitch

N/A

Alternatives

N/A

Additional context

Some projects have rolled their own ad-hoc way to prevent rebuilds, like https://github.com/facebookresearch/CompilerGym/blob/development/external/protobuf/build_protobuf.cmake#L8-L9

so we could use a similar approach

Cc @ChrisCummins

@ChrisCummins
Copy link
Contributor

ChrisCummins commented Mar 4, 2022

Thanks for filing this.

I think the goal here will be to either:

  1. build less stuff from source, by using system-wide deps or depending on binary releases
  2. figure out how to smartly prevent rebuilding deps when the config changes

The (1) option would be useful for the CI as well, as atm the build-linux-cmake step takes 5 hours, which is a productivity drain. The real time-sink is building LLVM from source, so the fix for this might be related to #568.

Cheers,
Chris

@ChrisCummins ChrisCummins added the Testing & Tooling Tests, tooling, and build systems label Mar 4, 2022
@mostafaelhoushi
Copy link
Contributor Author

Also I am wondering, if a quick temporary speedup of the LLVM build would be to add -j32 to its build command.

@ChrisCummins
Copy link
Contributor

Also I am wondering, if a quick temporary speedup of the LLVM build would be to add -j32 to its build command.

As far as I understand, the LLVM build is hardcoded to use Ninja, so should already be achieving high levels of parallelism:
https://github.com/facebookresearch/CompilerGym/blob/development/external/llvm/CMakeLists.txt#L43-L44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Testing & Tooling Tests, tooling, and build systems
Projects
None yet
Development

No branches or pull requests

2 participants