D3D12.X: skip queued builds of released pipelines #978

Closed
github-bot wants to merge 1 commit from gh-pr/978/head into gh-pr/978/base
Owner

@⁠nova-aryan on GitHub · 2026-11-24 09:49 UTC · original
nova-aryan:contrib/pso-cancel-released-builds → main · +67 −0 · 2 files · 1 commits · closed without merging

Normal PSO workers still compiled a queued pipeline after its stand-in was released. released() sets Pending::orphan, but only the preload worker checked it. Obsolete jobs can consume DXC/driver time while active jobs wait. Fixes #972.

What is in it

  • Check orphan before taking a job on the regular worker queue, matching preload.
  • Add a deterministic regression that gates all regular workers, queues and releases a stand-in, then verifies its compiler closure is discarded.
  • Document the queued-build behavior in README.

Tested
All runs below happened before the user asked to stop local execution.

  • Intel Core Ultra 7 265K, NVIDIA RTX 5060 (driver 621.24), Windows 11 Pro build 26200. Rust 1.100.0, debug; Windows MSVC-target executables cross-built from WSL with cargo-xwin and Clang 21.1.8, executed natively on Windows. DXC 1.9.2609.5.
  • Before the fix on main 6bac4b4 plus the regression: 0 passed, 1 failed with "released job reached the compiler".
  • After the fix: native test executable filtered to pso_async, --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored.
  • All 14 integration/test-title executables completed: 41 passed, 0 failed, 20 ignored. Synthetic test title only.
  • The first full library attempt had 677 passed, 2 failed, 21 ignored. Both failures were cross-build fixture paths; after correcting the local harness paths, both tests passed individually. A later full library run was stopped at the user's request before completion. It is not reported as a passing full suite.
  • git diff --check passed.

Regression run
Pending main/head retail title smoke runs.

Not tested
Retail title behavior, AMD/Intel GPUs, a completed full workspace test run, and a native MSVC compiler build. Full library GPU tests reported two no-wave64 skips. Cross-build fixture-path adjustments and the /FIstring.h workaround for libudis86 are confined to the local build setup.
This change is not established as a fix for the world-loading watchdog. No retail performance measurement is available. A release racing with a job that has already started can still complete through the existing orphan cleanup.
Local game/build/test execution has been stopped at the user's request. This PR remains a public draft for CI and independent validation.

AI use
Codex with GPT-6.1-sol investigated the issue, wrote the fix and regression, ran the checks above and drafted this description.

**@⁠nova-aryan** on GitHub · 2026-11-24 09:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/978) `nova-aryan:contrib/pso-cancel-released-builds` → `main` · +67 −0 · 2 files · 1 commits · closed without merging Normal PSO workers still compiled a queued pipeline after its stand-in was released. released() sets Pending::orphan, but only the preload worker checked it. Obsolete jobs can consume DXC/driver time while active jobs wait. Fixes #972. **What is in it** - Check orphan before taking a job on the regular worker queue, matching preload. - Add a deterministic regression that gates all regular workers, queues and releases a stand-in, then verifies its compiler closure is discarded. - Document the queued-build behavior in README. **Tested** All runs below happened before the user asked to stop local execution. - Intel Core Ultra 7 265K, NVIDIA RTX 5060 (driver 621.24), Windows 11 Pro build 26200. Rust 1.100.0, debug; Windows MSVC-target executables cross-built from WSL with cargo-xwin and Clang 21.1.8, executed natively on Windows. DXC 1.9.2609.5. - Before the fix on main 6bac4b4 plus the regression: 0 passed, 1 failed with "released job reached the compiler". - After the fix: native test executable filtered to pso_async, --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored. - All 14 integration/test-title executables completed: 41 passed, 0 failed, 20 ignored. Synthetic test title only. - The first full library attempt had 677 passed, 2 failed, 21 ignored. Both failures were cross-build fixture paths; after correcting the local harness paths, both tests passed individually. A later full library run was stopped at the user's request before completion. It is not reported as a passing full suite. - git diff --check passed. **Regression run** Pending main/head retail title smoke runs. **Not tested** Retail title behavior, AMD/Intel GPUs, a completed full workspace test run, and a native MSVC compiler build. Full library GPU tests reported two no-wave64 skips. Cross-build fixture-path adjustments and the /FIstring.h workaround for libudis86 are confined to the local build setup. This change is not established as a fix for the world-loading watchdog. No retail performance measurement is available. A release racing with a job that has already started can still complete through the existing orphan cleanup. Local game/build/test execution has been stopped at the user's request. This PR remains a public draft for CI and independent validation. **AI use** Codex with GPT-6.1-sol investigated the issue, wrote the fix and regression, ran the checks above and drafted this description.
Regular PSO workers ignored the orphan flag already honored by preload workers. Avoid compiler and driver work for stand-ins released before their queued job starts. A gate-based Windows test reproduces the obsolete build before this check. Fixes #972.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:55 +00:00
github-bot closed this pull request 2026-11-26 04:38:55 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 12:21 UTC · original

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib pso_async: 4 passed, 0 failed — includes the new released_queued_pipelines_are_not_built, which verifies a queued build is skipped once the title releases the pipeline.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7131320766) Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug. - `cargo test -p xcl --lib pso_async`: **4 passed, 0 failed** — includes the new `released_queued_pipelines_are_not_built`, which verifies a queued build is skipped once the title releases the pipeline. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 12:28 UTC · original

Independent Windows check on da491ee. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.

Tested. cargo test --offline --locked -p xcl --lib pso_async -- --test-threads=1 passed 3/3. In a scratch extension of the queue test, I released a stand-in while every compiler worker was occupied, then queued a replacement at the same synthetic address. The old job was discarded without running. The replacement ran, completed, and remained registered until explicitly released. The same-address case passed 3/3 isolated runs with the same command and the filter scratch_reused_stand_in_keeps_the_new_job_live.

Not tested. Native GPU pipeline creation, performance, or retail behavior. Both synthetic jobs returned zero.

AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch test and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 12:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7131494792) Independent Windows check on [`da491ee`](https://github.com/ivall/xcl/commit/da491ee5a64c2e13f94ed37397de819841f28c6c). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug. **Tested.** `cargo test --offline --locked -p xcl --lib pso_async -- --test-threads=1` passed 3/3. In a scratch extension of the queue test, I released a stand-in while every compiler worker was occupied, then queued a replacement at the same synthetic address. The old job was discarded without running. The replacement ran, completed, and remained registered until explicitly released. The same-address case passed 3/3 isolated runs with the same command and the filter `scratch_reused_stand_in_keeps_the_new_job_live`. **Not tested.** Native GPU pipeline creation, performance, or retail behavior. Both synthetic jobs returned zero. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch test and drafted this report.
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 03:09 UTC · original

Regression run of da491ee5 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: da491ee5a64c2e13f94ed37397de819841f28c6c
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1613 (PresentX 1613)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14812 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-25 03:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7151646055) Regression run of `da491ee5` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: da491ee5a64c2e13f94ed37397de819841f28c6c gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1613 (PresentX 1613) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14812 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠Prime1997 on GitHub · 2026-11-26 00:52 UTC · original

Closing because main already has this behaviour, from b4d74821 ("D3D12.X: skip orphaned queued builds in normal PSO workers", Fixes #972). On main, the queue workers call build_queued(), which checks p.orphan and drops an unstarted job through drop_unstarted_job(). That is the same skip of released stand-ins that this PR adds. Only the one-line README note here is not on main.

Compared at head da491ee5 against main 08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.

**@⁠Prime1997** on GitHub · 2026-11-26 00:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7179204827) Closing because main already has this behaviour, from b4d74821 ("D3D12.X: skip orphaned queued builds in normal PSO workers", Fixes #972). On main, the queue workers call `build_queued()`, which checks `p.orphan` and drops an unstarted job through `drop_unstarted_job()`. That is the same skip of released stand-ins that this PR adds. Only the one-line README note here is not on main. Compared at head da491ee5 against main 08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:23 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 03:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7181678801) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.