README: document XCL_PREPARE_WORKERS and XCL_PIPELINE_THREADS #3113

Open
romeawayfromhome-rgb wants to merge 1 commit from upstream-pr/3113 into main
romeawayfromhome-rgb commented 2026-11-28 09:11:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-11-28T09:11:06Z.


What is in it

  • README only: documents the two pipeline-preparation concurrency switches next to the existing --pipelines size-cap bullet. XCL_PREPARE_WORKERS (processes building a pack's compute pipelines before a title starts, clamped 1–32, default from processor count and free commit) and XCL_PIPELINE_THREADS (driver compiles at once, default derived from processor count and RAM). Verified against prepare_workers() / workers_for() and pipeline_threads() / default_pipeline_threads() in crates/xcl/src/shaders.rs at e429936.

Tested

  • Read the code paths above at upstream head e429936 and checked the README had no mention of either variable. Documentation only; no code changed.

Regression run

  • Not needed: README only, no crates/xcl/src change.

Not tested

  • Not compiled or run: this change is documentation only and was prepared on a Linux VM without a Rust toolchain or Windows GPU host, so no cargo test or smoke run was performed. CI is the check.

AI use

  • Muse (Muse Spark) scouted the candidate, verified the semantics against the source, and wrote the README text and this description.
<!-- greyfinch-sync:ivall/xcl:issue:5538611349 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3113). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-11-28T09:11:06Z. --- **What is in it** - README only: documents the two pipeline-preparation concurrency switches next to the existing `--pipelines` size-cap bullet. `XCL_PREPARE_WORKERS` (processes building a pack's compute pipelines before a title starts, clamped 1–32, default from processor count and free commit) and `XCL_PIPELINE_THREADS` (driver compiles at once, default derived from processor count and RAM). Verified against `prepare_workers()` / `workers_for()` and `pipeline_threads()` / `default_pipeline_threads()` in crates/xcl/src/shaders.rs at e429936. **Tested** - Read the code paths above at upstream head e429936 and checked the README had no mention of either variable. Documentation only; no code changed. **Regression run** - Not needed: README only, no crates/xcl/src change. **Not tested** - Not compiled or run: this change is documentation only and was prepared on a Linux VM without a Rust toolchain or Windows GPU host, so no cargo test or smoke run was performed. CI is the check. **AI use** - Muse (Muse Spark) scouted the candidate, verified the semantics against the source, and wrote the README text and this description.
Foniass commented 2026-12-01 09:32:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:32:17Z.


Triage (#1607) – head 25be5d9

#1962 documents XCL_PIPELINE_THREADS differently: it says only xcl shaders --pipelines reads it, with a default of 4. On main, shaders.rs::default_pipeline_threads derives the default from cores and RAM, and corpus_threads / the preparation workers read it too, so this PR's text matches main and #1962's does not. The XCL_PREPARE_WORKERS text matches prepare_workers / workers_for.
Nit: the new item is nested under the --pipelines size cap bullet, which is about something else.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306844705 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3113#issuecomment-7306844705). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:32:17Z. --- **Triage (#1607)** – head 25be5d9 #1962 documents `XCL_PIPELINE_THREADS` differently: it says only `xcl shaders --pipelines` reads it, with a default of 4. On main, `shaders.rs::default_pipeline_threads` derives the default from cores and RAM, and `corpus_threads` / the preparation workers read it too, so this PR's text matches main and #1962's does not. The `XCL_PREPARE_WORKERS` text matches `prepare_workers` / `workers_for`. Nit: the new item is nested under the `--pipelines` size cap bullet, which is about something else. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Foniass commented 2026-12-01 10:13:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:13:47Z.


Review (head 25be5d9a, diff read; README only, nothing to build or run):

  • Precision: a set XCL_PIPELINE_THREADS is only floored at 1 (shaders.rs ~2126 threads.max(1)), not capped at 32, and the derived value is min(cores, RAM GB / 2) clamped to 1-32 (default_pipeline_threads ~2122). Saying "unset: the logical processors or half the installed RAM in GB, whichever is lower, 1-32" would be exact. It also applies to xcl shaders pipeline builds and preparation, which the bullet's heading already implies.
  • XCL_PREPARE_WORKERS isn't trimmed (~3475), so " 4" counts as unset. Minor.

Fine: prepare_workers clamps a set value to 1-32, and the unset rule (logical processors less four, at most 32, at most one per 3 GiB of free commit, at least 1, workers_for ~3491) matches the text. The README doesn't name either variable yet. Looks good to merge.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7307867096 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3113#issuecomment-7307867096). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:13:47Z. --- Review (head 25be5d9a, diff read; README only, nothing to build or run): - Precision: a set `XCL_PIPELINE_THREADS` is only floored at 1 (`shaders.rs` ~2126 `threads.max(1)`), not capped at 32, and the derived value is `min(cores, RAM GB / 2)` clamped to 1-32 (`default_pipeline_threads` ~2122). Saying "unset: the logical processors or half the installed RAM in GB, whichever is lower, 1-32" would be exact. It also applies to `xcl shaders` pipeline builds and preparation, which the bullet's heading already implies. - `XCL_PREPARE_WORKERS` isn't trimmed (~3475), so `" 4"` counts as unset. Minor. Fine: `prepare_workers` clamps a set value to 1-32, and the unset rule (logical processors less four, at most 32, at most one per 3 GiB of free commit, at least 1, `workers_for` ~3491) matches the text. The README doesn't name either variable yet. Looks good to merge. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3113:upstream-pr/3113'
git switch 'upstream-pr/3113'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3113'
git switch 'upstream-pr/3113'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3113'
git switch 'upstream-pr/3113'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3113'
git switch 'main'
git merge --squash 'upstream-pr/3113'
git switch 'main'
git merge --ff-only 'upstream-pr/3113'
git switch 'main'
git merge 'upstream-pr/3113'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3113
No description provided.