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

fix: switch ld with lld on linux, fixes OOM #1388

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ LLVM_SYS_181_PREFIX = "/usr/lib/llvm-18/"
MLIR_SYS_180_PREFIX = "/usr/lib/llvm-18/"
TABLEGEN_180_PREFIX = "/usr/lib/llvm-18/"

# Limit concurrency to prevent crash during "cargo build" due to excessive memory usage. Should be removed in the future. Slows down performance.
[build]
jobs = 8

# Limit concurrency to prevent crash during "cargo test" due to excessive memory usage. Should be removed in the future. Slows down performance.
[test]
jobs = 8
# Use `lld` for linking instead of `ld`, since we run out of memory while linking with `ld` on
# 16-cores linux machines, see:
# https://nnethercote.github.io/perf-book/build-configuration.html#linking.
# TODO: remove this once `rust` stabilizes `lld` as the default linker, currently only on nightly:
# https://github.com/rust-lang/rust/issues/39915#issuecomment-618726211
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Clink-arg=-fuse-ld=lld"]
1 change: 1 addition & 0 deletions .github/workflows/committer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
gcloud storage cp -r gs://committer-testing-artifacts/$NEW_BENCH_INPUT_FILES_PREFIX/* ./crates/committer_cli/test_inputs

# Benchmark the new code, splitting the benchmarks, and prepare the results for posting a comment.
- uses: ./.github/actions/bootstrap
- run: bash ./crates/committer_cli/benches/bench_split_and_prepare_post.sh benchmarks_list.txt bench_new.txt

- run: echo BENCHES_RESULT=$(cat bench_new.txt) >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion scripts/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function setup_llvm_deps() {
libmlir-18-dev \
libpolly-18-dev \
libzstd-dev \
mlir-18-tools
mlir-18-tools \
lld
'
;;
*)
Expand Down
Loading