Repository navigation
RR runtime build: -j N, --shader-timeout and --max-wall - #244
Draft
phantoslayer21 wants to merge 1 commit into
Draft
phantoslayer21 wants to merge 1 commit into
phantoslayer21 wants to merge 1 commit into
Conversation
-j N: a dry pass of kernels() records every build_dx12.compile_hlsl call (each builder computes its cached DXIL path before compiling, so the dry pass returns it without compiling); N workers then compile the recorded calls into the same cache, and the real pass finds every DXIL cached. Same calls and paths, so the same DXIL bytes as the serial build (30 of 30 and later 8 more large kernels compared byte for byte). The stage precompile pools get N too. --shader-timeout S (default 1200): every dxc call of the build is stopped after S seconds and the kernel named; the others still compile, then the build stops with the list. --max-wall S: no new compile starts after S seconds, the build stops and the same command continues from the cache, so a full build can run as bounded sessions. Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as draft
November 15, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speeds up and bounds the RR runtime library build (
python -m clean.rr_f.runtime.tools.build), which compiled most of its ~150 kernels one dxc process at a time and could sit on one slow shader with no limit.-j N(defaultWG_RR_JOBSor 4): a dry pass ofkernels()records everybuild_dx12.compile_hlslcall instead of running it (every builder computes its cached DXIL path before it compiles), then N workers compile the recorded calls into the same cache; the normal pass then finds every DXIL cached. Same calls, same paths, so the same DXIL bytes. The existing stage precompile pools get N too.--shader-timeout S(default 1200): every dxc call of the build is stopped after S seconds and the kernel is named; the other kernels still compile, then the build stops with the list.--max-wall S(default off): no new compile starts after S seconds; the build stops and the same command continues from the cache, so a full build can run as bounded sessions.One file changed:
clean/rr_f/runtime/tools/build.py. No kernel source changes.Tested
-j 4build against a serial build of the same commit, compared file by file (name + SHA-256): 38 of 38 kernels built so far identical (30 in the first session, 8 large exact stage kernels in a--max-wall 600session).--shader-timeout: with 300 s, the 8 largest exact stage kernels were stopped and named while the others kept compiling; they take 840-850 s each with 4 compiles at once, hence the 1200 s default.--max-wall 600: the session stopped starting compiles after 600 s, finished the ones running, and reported the kernels left; the next run continued from the cache.Not tested
-jend to end (link of the runtime DLL after the prebuild): not run yet, compile slots were busy.-jvalues other than 4.