Skip to content

tooling: compile requests written during a compile_dxil watch pass first - #3403

Open
Leyukaka wants to merge 1 commit into
R0Y00:mainfrom
Leyukaka:tooling-compile-dxil-watch-order
Open

Leyukaka wants to merge 1 commit into
R0Y00:mainfrom
Leyukaka:tooling-compile-dxil-watch-order

Conversation

@Leyukaka

Copy link
Copy Markdown
Collaborator

Change

compile_dxil --watch sorted pending requests by marker path and compiled the whole list before it scanned again, so a request written during a pass waited for the whole backlog. As gfx2hlsl.py --watch now does (#3396), requests whose ready marker is newer than the watcher's start go first, newest first, in batches of up to four keys per worker, with a rescan between batches at most once per second (steady clock). A key is attempted once per pass; the first-pass retry of earlier failures, --skip-failed and --requests are unchanged, and each key's outputs are the same.

Refs #3392 (the compile_dxil half; the gfx2hlsl.py half is #3396).

Verification

Commit e270b240 on main 6747721c (the head c901a1f2 is that commit rebased onto 0614f68c, which adds only #3329 in other files), Windows 11, release preset.

  • ctest --test-dir out/build/release -R "^native_compile_dxil_watch$": passes. The new case writes five old requests and one new compute request that sorts last by path, then runs --watch --once twice: with every marker old (the old order) the new key is processed last; with its marker newer than the watcher's start it is processed first; the output files are byte-identical in both runs.
  • Negative control: the same test file against main's compile_dxil fails at watch_orders["fresh"] == [fresh_key, *backlog] (the new key comes last).
  • ctest -j 6 -R "native_compile_dxil|compile_dxil|startup_gfx2hlsl_watch": 5/5 pass.

Evidence and follow-up

Synthetic requests only, written by the test. Not covered by the test: a request written during the pass (the rescan between batches) and the once-per-pass filter; only the order of requests present at start is tested. If a rescan fails in the middle of the first pass, --skip-failed is not switched on, so keys already refused in that pass get one more attempt in the next one. Not measured: the wait in a real run, and passes with several workers (the test uses one); with --jobs > 1, new_worker() now runs per worker per batch instead of per pass.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • No application files, dumps, distribution links or secrets included.

…first

compile_dxil --watch sorted pending requests by marker path and compiled the whole list before
scanning again, so a request written during a pass waited for the whole backlog. As in
gfx2hlsl.py (R0Y00#3396), requests whose ready marker is newer than the watcher's start now go first,
newest first, in batches of up to four keys per worker, with a rescan between batches at most once
per second. --requests keeps its order; outputs are unchanged.

Refs R0Y00#3392.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant