Skip to content

fix(build): cap parallel compilation threads to prevent CPU lockup#5156

Open
Katsoragi wants to merge 1 commit into
odysseus-dev:devfrom
Katsoragi:personal/capped-build-threads
Open

fix(build): cap parallel compilation threads to prevent CPU lockup#5156
Katsoragi wants to merge 1 commit into
odysseus-dev:devfrom
Katsoragi:personal/capped-build-threads

Conversation

@Katsoragi

@Katsoragi Katsoragi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Caps compiler thread usage to (total_cores - 2) when compiling llama.cpp natively to avoid host system lockups. Previously, it used nproc (all cores), which froze user systems. It also handles local endpoint context window queries properly.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #5161

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app and verified the change works end-to-end.

How to Test

Verify that llama.cpp native builds use the capped number of threads and do not freeze the host.

Checks Run

  • Run pytest suite: pytest tests/test_model_defaults.py (All Passed).

@github-actions github-actions Bot added needs work PR description incomplete — please update before review ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review labels Jul 3, 2026
@alteixeira20 alteixeira20 added the bug Something isn't working label Jul 4, 2026
@Katsoragi
Katsoragi force-pushed the personal/capped-build-threads branch from 91806d5 to 11e3d9b Compare July 12, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: compiler lockup on parallel native builds

2 participants