Repository navigation
Conversation
Windows 11 can put a console process it judges to be in the background under EcoQoS, which on a hybrid CPU moves its threads to the E-cores. `xcl shaders --precompile` is long CPU-bound work that the user is waiting on, so it opts out of execution-speed throttling at the start of `run`, the same call `kernelx::fine_timer` makes for timer resolution. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prime1997
left a comment
There was a problem hiding this comment.
Good within the reviewed scope; retain for integration. This draft has a useful, narrowly scoped change: it disables execution-speed EcoQoS throttling for the shader command process.
PR head e59d1d11043b4620aaa961d93580bf1171f2ae2f integrated locally with current main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. The detached worktree remains at main with the combined changes staged, tree ed8cd9ab3bdcd5975bdab074e4e683e7f6346dd4; it is an uncommitted integration candidate, not a clean PR-head run. Source patch SHA-256 374d930a3c5c9ed3e40170d33c82a65135712a743aa01c1488f84281e3ee6fb2.
Targeted result: 1 passed, 0 failed, 0 ignored, 0 skipped. Each exact filter ran in a fresh process:
shaders::tests::full_speed_turns_execution_speed_throttling_off
Build: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run: <test-exe> <each-exact-filter-above> --exact --test-threads=1 --nocapture. Private executable/target paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug. These selected fixtures did not dispatch GPU work.
Not tested: The process power-state fixture passed. It does not establish faster compilation, different scheduling priority or system-wide power changes. No whole suite or retail smoke was run for this batch; this is not merge certification.
AI use: Codex (GPT-6) reviewed source, ran the selected tests and verified raw results. Optional temporary Discord for coordinating contributor work, testing and comparing results.
xcl shaders(--recomp,--precompile) is long CPU-bound work the user waits on, but Windows 11 puts it under EcoQoS when its console is not in the foreground, and on a hybrid CPU that keeps its threads on the E-cores. This opts the process out of execution-speed throttling at the start ofshaders::run, with the sameSetProcessInformation(ProcessPowerThrottling)callkernelx::fine_timer(#300) already makes for timer resolution. If Windows refuses, it prints a warning and goes on as before.What is in it
crates/xcl/src/shaders.rs:full_speed(), called at the start ofrun, and a unit test that reads the state back withGetProcessInformation(it fails without the call:ControlMaskreads back as 0).Tested
RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF (8 P-cores / 16 logical, 16 E-cores), Windows 11 26200, stable Rust, debug for the tests, release for the runs.
cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored; 26SKIPPED(no wave64, no dxil.dll).xcl shaders <retail shader pack> --recompstarted from a background shell, average use per logical CPU over 50 s (\Processor(*)\% Processor Time, 2 s samples), release builds of main and of this head:b49be18e59d1d1The whole
xcl shaders <retail shader pack> --recomp(26,698 programs), same background shell, wall-clock time, runs alternated main / PR / main / PR: main 195.4 s, 193.0 s; this PR 143.4 s, 143.4 s (26 % less).Regression run
xcl rundoes not reach the changed code, so this is only a regression check.Not tested
--precompile(DXC and driver compiles; only--recompwas timed), a run started from a foreground window, AMD and Intel GPUs, CPUs without E-cores (the call should change nothing there), Windows 10.nvidia-dev, which also runxcl shadersand would get this when it is merged there.AI use
🤖 Generated with Claude Code