Recompiler: serialize dxc::wait_for_memory slot admission (#2463) #2642

Closed
fixgep wants to merge 1 commit from upstream-pr/2652 into main
fixgep commented 2026-11-26 05:05:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fixgep on 2026-11-26T05:05:00Z.


Fixes the TOCTOU admission race in dxc::wait_for_memory (crates/xcl/src/gpu/recomp/dxc.rs) where concurrent DXC worker wakeups read WORKING without synchronization before calling fetch_add(1), admitting bursts past both the commit headroom check and WANTED_AT_ONCE. Part of #2463, Part of #1566, Part of #1269.

What is in it

  • crates/xcl/src/gpu/recomp/dxc.rs: wrap WORKING admission checks (plenty, timed_out, cur == 0, and cur < WANTED_AT_ONCE && wanted()) and fetch_add(1) in a MemoryGate mutex while keeping MemorySlot::drop lock-free and sleeping outside the mutex; add synthetic multi-threaded unit tests in memory_gate_tests.

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 3060 (driver 32.0.15.9144), AMD Ryzen 5 7500F, Windows 11 Pro 10.0.26200, rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), debug & release builds on commit 88d7b0a1.
  • cargo test -p xcl --lib gpu::recomp::dxc:: -- --test-threads=4: 24 passed, 0 failed, 0 ignored (0 SKIPPED); also 24 passed, 0 failed under XCL_ADAPTER=warp.
  • cargo test -p xcl --lib -- --test-threads=4: 1312 passed, 1 failed (gpu::recomp::tests::gpu_clamp_and_omod_per_instruction, v_pk_add_i16 clamp mismatch on RTX 3060), 27 ignored (25 SKIPPED: 21 no wave64, 3 wave32 per-lane refused, 1 cannot disable the driver cache).
  • XCL_ADAPTER=warp cargo test -p xcl --lib -- --test-threads=4: 1312 passed, 1 failed (hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares under parallel adapter/UMA init; passed on default GPU), 27 ignored.
  • cargo test -p xcl --test '*' -- --test-threads=4: 126 passed, 0 failed, 20 ignored across 33 integration test suites (1 SKIPPED: no heap windows).

Regression run


xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1600 (PresentX 1600)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 14006 MB


xcl-smoke v1
commit: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1604)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13964 MB

Not tested

  • AMD / Intel GPUs, wave64 hardware, and items 1 and 3 of #2463 (covered separately).

AI use

  • Antigravity (Gemini 4 Hydrogen): GitHub REST API pre-flight check, root-cause inspection, implementation of MemoryGate and memory_gate_tests, test/smoke execution, and PR description drafting.
<!-- greyfinch-sync:ivall/xcl:issue:5504334434 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652). Originally posted by [fixgep](https://github.com/fixgep) on 2026-11-26T05:05:00Z. --- Fixes the TOCTOU admission race in `dxc::wait_for_memory` (`crates/xcl/src/gpu/recomp/dxc.rs`) where concurrent DXC worker wakeups read `WORKING` without synchronization before calling `fetch_add(1)`, admitting bursts past both the commit headroom check and `WANTED_AT_ONCE`. Part of #2463, Part of #1566, Part of #1269. **What is in it** - `crates/xcl/src/gpu/recomp/dxc.rs`: wrap `WORKING` admission checks (`plenty`, `timed_out`, `cur == 0`, and `cur < WANTED_AT_ONCE && wanted()`) and `fetch_add(1)` in a `MemoryGate` mutex while keeping `MemorySlot::drop` lock-free and sleeping outside the mutex; add synthetic multi-threaded unit tests in `memory_gate_tests`. **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 3060 (driver 32.0.15.9144), AMD Ryzen 5 7500F, Windows 11 Pro 10.0.26200, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), debug & release builds on commit `88d7b0a1`. - `cargo test -p xcl --lib gpu::recomp::dxc:: -- --test-threads=4`: 24 passed, 0 failed, 0 ignored (0 SKIPPED); also 24 passed, 0 failed under `XCL_ADAPTER=warp`. - `cargo test -p xcl --lib -- --test-threads=4`: 1312 passed, 1 failed (`gpu::recomp::tests::gpu_clamp_and_omod_per_instruction`, `v_pk_add_i16` clamp mismatch on RTX 3060), 27 ignored (25 SKIPPED: 21 `no wave64`, 3 `wave32 per-lane refused`, 1 `cannot disable the driver cache`). - `XCL_ADAPTER=warp cargo test -p xcl --lib -- --test-threads=4`: 1312 passed, 1 failed (`hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares` under parallel adapter/UMA init; passed on default GPU), 27 ignored. - `cargo test -p xcl --test '*' -- --test-threads=4`: 126 passed, 0 failed, 20 ignored across 33 integration test suites (1 SKIPPED: `no heap windows`). **Regression run** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1600 (PresentX 1600) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 14006 MB ``` ``` xcl-smoke v1 commit: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1604 (PresentX 1604) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13964 MB ``` **Not tested** - AMD / Intel GPUs, wave64 hardware, and items 1 and 3 of #2463 (covered separately). **AI use** - Antigravity (Gemini 4 Hydrogen): GitHub REST API pre-flight check, root-cause inspection, implementation of `MemoryGate` and `memory_gate_tests`, test/smoke execution, and PR description drafting.
pickles976 commented 2026-11-26 06:06:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-26T05:06:53Z.


Tested: exact clean head 88d7b0a19a276f81491e8430acb5d7dd501ebb1e, Windows MSVC target under Wine 11.0 on Linux, 16 GiB RAM / RTX 4060 Laptop GPU host. Fresh Compiling xcl .../xcl-pr2652/crates/xcl provenance confirmed.

cargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib memory_gate_tests -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, 0.14 s. This covers tight synthetic commit headroom, the wanted burst limit, draining concurrent waiters, and the single unwanted progress slot. Tests internally spawn concurrent callers despite the serial test harness. Run through the local Wine wrapper in a scope with MemoryMax=9G / MemorySwapMax=512M.

Not tested: real compiler-memory peaks, Windows-native execution, GPU dispatch, retail title, or matched-parent regression. These are CPU synchronization tests with supplied memory values, not proof of Wine's commit telemetry or a hard memory budget. The existing 60-second escape remains; this addresses #2463 item 2, not its separate title-thread driver-compile bypass. No title-safety or FPS claim.

Local log: .compat-xcl/logs/verify-pr2652-wine-memory-gate.log. AI use: omp / OpenAI Codex GPT-6 Astra, test execution and report; no source changes.

<!-- greyfinch-sync:ivall/xcl:comment:7183192463 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7183192463). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-26T05:06:53Z. --- **Tested:** exact clean head `88d7b0a19a276f81491e8430acb5d7dd501ebb1e`, Windows MSVC target under Wine 11.0 on Linux, 16 GiB RAM / RTX 4060 Laptop GPU host. Fresh `Compiling xcl .../xcl-pr2652/crates/xcl` provenance confirmed. `cargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib memory_gate_tests -- --nocapture --test-threads=1`: **4 passed, 0 failed, 0 ignored**, 0.14 s. This covers tight synthetic commit headroom, the wanted burst limit, draining concurrent waiters, and the single unwanted progress slot. Tests internally spawn concurrent callers despite the serial test harness. Run through the local Wine wrapper in a scope with MemoryMax=9G / MemorySwapMax=512M. **Not tested:** real compiler-memory peaks, Windows-native execution, GPU dispatch, retail title, or matched-parent regression. These are CPU synchronization tests with supplied memory values, not proof of Wine's commit telemetry or a hard memory budget. The existing 60-second escape remains; this addresses #2463 item 2, not its separate title-thread driver-compile bypass. No title-safety or FPS claim. Local log: `.compat-xcl/logs/verify-pr2652-wine-memory-gate.log`. AI use: omp / OpenAI Codex GPT-6 Astra, test execution and report; no source changes.
SlopTart commented 2026-11-26 06:06:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T05:29:57Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV.
Targeted run of low_commit_unwanted_admits_only_one_progress_slot, tight_commit_headroom_bounds_concurrent_admissions, wait_for_memory_drains_concurrent_waiters_within_cap, wanted_burst_never_exceeds_wanted_at_once: 4 passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7183539415 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7183539415). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T05:29:57Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV. Targeted run of `low_commit_unwanted_admits_only_one_progress_slot`, `tight_commit_headroom_bounds_concurrent_admissions`, `wait_for_memory_drains_concurrent_waiters_within_cap`, `wanted_burst_never_exceeds_wanted_at_once`: 4 passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
oni-swr commented 2026-11-26 09:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T08:31:55Z.


Independent native AMD test report for #2652 (issue #2463, item 2) on exact head 88d7b0a19a276f81491e8430acb5d7dd501ebb1e, against its exact parent b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 (main, also the merge base). Both were clean detached checkouts with no local changes; PR head and comments were rechecked before posting. This is a test report only, not a source review.

Tested

  • Hardware and software: AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build. The suite log names AMD Radeon RX 7800 XT as the adapter (D3D12.X: backend 'real'). No other xcl process was using the GPU.
  • Every build and test used cargo --locked -j 4. Workspace binaries were built before the tests (cargo build --workspace, then cargo test --workspace --no-run).
  • Focused synthetic admission tests, head: cargo test -p xcl --lib memory_gate -- --test-threads=1: 4 passed, 0 failed, 0 ignored (low_commit_unwanted_admits_only_one_progress_slot, tight_commit_headroom_bounds_concurrent_admissions, wait_for_memory_drains_concurrent_waiters_within_cap, wanted_burst_never_exceeds_wanted_at_once). I ran them 10 more times with --test-threads=4: 4 passed each time. The tests use supplied memory values, not real compiler memory peaks.
  • cargo test -p xcl --lib dxc -- --test-threads=4: head 48 passed, 0 failed, 3 ignored. Parent 44 passed, 0 failed, 3 ignored. The difference is the 4 new tests, which do not exist on the parent (memory_gate on the parent runs 0 tests).
  • Whole suite, head: cargo test --workspace --no-fail-fast -- --test-threads=4: 1438 passed, 1 failed, 47 ignored (lib: 1312 passed, 1 failed, 27 ignored).
  • Whole suite, parent (same command): 1434 passed, 1 failed, 47 ignored (lib: 1308 passed, 1 failed, 27 ignored). Head minus parent is +4 passed, which is the 4 new tests.
  • The single failure is the same on both: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, seed 722: res[30] = 0x1, CPU 0x7fffffff. It is a baseline failure on this adapter, not caused by the PR.
  • SKIPPED lines are identical on head and parent (7 each): 6 f16_programs_on_the_gpu / f32_programs_on_the_gpu cases (refused ... its #1426 semantics differ) and heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows. None of them touches dxc.rs. I do not count skips as coverage.
  • The first parent attempt reused the head's test binary because of shared-target file timestamps. I noticed it from the identical exe hash and 4 memory_gate tests, discarded it, rebuilt the parent from its own path (Compiling xcl ... xcl-2652-src-parent) and reran. The parent counts above come from that rerun.

Regression run

  • Not run. I ran no scripts/smoke.ps1 and used no title or game data.

Not tested

  • Real DXC memory peaks, real commit-pressure behaviour, the 60-second escape under load, the separate title-thread driver-compile bypass of #2463, NVIDIA and Intel, release builds, retail titles, and any FPS or title-safety claim.

AI use

  • The test run and this report were written by Claude Code (Claude Sonnet 5.5), coordinated by Codex (gpt-6.2-sol). The commands and counts above come from my runs; no source changes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:comment:7186707125 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7186707125). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-26T08:31:55Z. --- Independent native AMD test report for #2652 (issue #2463, item 2) on exact head `88d7b0a19a276f81491e8430acb5d7dd501ebb1e`, against its exact parent `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7` (`main`, also the merge base). Both were clean detached checkouts with no local changes; PR head and comments were rechecked before posting. This is a test report only, not a source review. **Tested** - Hardware and software: AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), debug build. The suite log names `AMD Radeon RX 7800 XT` as the adapter (`D3D12.X: backend 'real'`). No other xcl process was using the GPU. - Every build and test used `cargo --locked -j 4`. Workspace binaries were built before the tests (`cargo build --workspace`, then `cargo test --workspace --no-run`). - Focused synthetic admission tests, head: `cargo test -p xcl --lib memory_gate -- --test-threads=1`: **4 passed, 0 failed, 0 ignored** (`low_commit_unwanted_admits_only_one_progress_slot`, `tight_commit_headroom_bounds_concurrent_admissions`, `wait_for_memory_drains_concurrent_waiters_within_cap`, `wanted_burst_never_exceeds_wanted_at_once`). I ran them 10 more times with `--test-threads=4`: 4 passed each time. The tests use supplied memory values, not real compiler memory peaks. - `cargo test -p xcl --lib dxc -- --test-threads=4`: head 48 passed, 0 failed, 3 ignored. Parent 44 passed, 0 failed, 3 ignored. The difference is the 4 new tests, which do not exist on the parent (`memory_gate` on the parent runs 0 tests). - Whole suite, head: `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1438 passed, 1 failed, 47 ignored** (lib: 1312 passed, 1 failed, 27 ignored). - Whole suite, parent (same command): **1434 passed, 1 failed, 47 ignored** (lib: 1308 passed, 1 failed, 27 ignored). Head minus parent is +4 passed, which is the 4 new tests. - The single failure is the same on both: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `seed 722: res[30] = 0x1, CPU 0x7fffffff`. It is a baseline failure on this adapter, not caused by the PR. - SKIPPED lines are identical on head and parent (7 each): 6 `f16_programs_on_the_gpu` / `f32_programs_on_the_gpu` cases (`refused ... its #1426 semantics differ`) and `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`. None of them touches `dxc.rs`. I do not count skips as coverage. - The first parent attempt reused the head's test binary because of shared-target file timestamps. I noticed it from the identical exe hash and 4 `memory_gate` tests, discarded it, rebuilt the parent from its own path (`Compiling xcl ... xcl-2652-src-parent`) and reran. The parent counts above come from that rerun. **Regression run** - Not run. I ran no `scripts/smoke.ps1` and used no title or game data. **Not tested** - Real DXC memory peaks, real commit-pressure behaviour, the 60-second escape under load, the separate title-thread driver-compile bypass of #2463, NVIDIA and Intel, release builds, retail titles, and any FPS or title-safety claim. **AI use** - The test run and this report were written by Claude Code (Claude Sonnet 5.5), coordinated by Codex (gpt-6.2-sol). The commands and counts above come from my runs; no source changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thehollowedone commented 2026-11-26 09:07:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T08:59:11Z.


Independent native Windows/NVIDIA test of PR #2652 head 88d7b0a, based on main b49be18. Clean exact-head checkout; RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11. DXIL cache was isolated under this checkout's target directory.

Tested

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib memory_gate_tests -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, 0 skips. The tests internally spawn concurrent callers for commit headroom, wanted-burst admission, draining, and the one-progress-slot rule.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet: 1,439 passed, 0 failed, 47 ignored across 37 test targets, with 25 explicit GPU skip notices. Skips are not counted as GPU coverage.

Not tested: a measured DXC memory peak under retail world load, deliberate system commit exhaustion, AMD/Intel hardware, or my own paired title smoke. These results verify the synthetic admission tests and workspace behavior on this machine; they do not establish a title-level memory or frame-rate improvement.

AI-assisted: Codex (GPT-6.2 Sol) ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7187266267 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7187266267). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-26T08:59:11Z. --- Independent native Windows/NVIDIA test of [PR #2652 head `88d7b0a`](https://github.com/xcl-dev/xcl/commit/88d7b0a19a276f81491e8430acb5d7dd501ebb1e), based on [main `b49be18`](https://github.com/xcl-dev/xcl/commit/b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Clean exact-head checkout; RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11. DXIL cache was isolated under this checkout's `target` directory. **Tested** - `cargo build --offline --locked --workspace`: passed. - `cargo test --offline --locked -p xcl --lib memory_gate_tests -- --nocapture --test-threads=1`: **4 passed, 0 failed, 0 ignored, 0 skips**. The tests internally spawn concurrent callers for commit headroom, wanted-burst admission, draining, and the one-progress-slot rule. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet`: **1,439 passed, 0 failed, 47 ignored** across 37 test targets, with **25 explicit GPU skip notices**. Skips are not counted as GPU coverage. **Not tested:** a measured DXC memory peak under retail world load, deliberate system commit exhaustion, AMD/Intel hardware, or my own paired title smoke. These results verify the synthetic admission tests and workspace behavior on this machine; they do not establish a title-level memory or frame-rate improvement. AI-assisted: Codex (GPT-6.2 Sol) ran the tests and drafted this report.
throny commented 2026-11-26 14:03:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-26T13:08:30Z.


Two contributors checked independently and found that #1417 solves the same problem (for #2463) in a different way: #1607, group D126. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7192931097 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7192931097). Originally posted by [throny](https://github.com/throny) on 2026-11-26T13:08:30Z. --- <!-- xcl-1607-hint:D126 --> Two contributors checked independently and found that #1417 solves the same problem (for #2463) in a different way: #1607, group D126. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
fixgep commented 2026-11-26 15:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fixgep on 2026-11-26T14:19:24Z.


Thanks for flagging #1417, @throny

I checked #1417 (9a3230fa) against this PR (88d7b0a1) and think it makes sense to keep #2652 open unless maintainers prefer rebasing #1417:

  • Merge & scope status: #1417 currently has a merge conflict in README.md (mergeable: false, flagged on Nov 24 and not yet rebased), whereas #2652 touches only crates/xcl/src/gpu/recomp/dxc.rs and merges cleanly onto main.
  • Admission atomicity: #1417's try_admit_compile CAS loop prevents the WORKING race for running == 0 and WANTED_AT_ONCE, but reads GlobalMemoryStatusEx outside the CAS loop and re-evaluates wanted() (locking Pending::demand in pso_async) on every retry. #2652's MemoryGate evaluates avail_page_file(), wanted(), and the working increment together while keeping MemorySlot::drop lock-free and sleeping outside the mutex.
  • Tests: #1417's memory_tests cover WANTED_AT_ONCE and running == 0; #2652's memory_gate_tests also cover tight commit headroom (avail >= need), timeout fallback, and concurrent waiter draining.

Happy to defer to whichever approach maintainers prefer.

<!-- greyfinch-sync:ivall/xcl:comment:7194631212 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7194631212). Originally posted by [fixgep](https://github.com/fixgep) on 2026-11-26T14:19:24Z. --- Thanks for flagging #1417, @throny I checked #1417 (`9a3230fa`) against this PR (`88d7b0a1`) and think it makes sense to keep #2652 open unless maintainers prefer rebasing #1417: - **Merge & scope status:** #1417 currently has a merge conflict in `README.md` (`mergeable: false`, flagged on Nov 24 and not yet rebased), whereas #2652 touches only `crates/xcl/src/gpu/recomp/dxc.rs` and merges cleanly onto `main`. - **Admission atomicity:** #1417's `try_admit_compile` CAS loop prevents the `WORKING` race for `running == 0` and `WANTED_AT_ONCE`, but reads `GlobalMemoryStatusEx` outside the CAS loop and re-evaluates `wanted()` (locking `Pending::demand` in `pso_async`) on every retry. #2652's `MemoryGate` evaluates `avail_page_file()`, `wanted()`, and the `working` increment together while keeping `MemorySlot::drop` lock-free and sleeping outside the mutex. - **Tests:** #1417's `memory_tests` cover `WANTED_AT_ONCE` and `running == 0`; #2652's `memory_gate_tests` also cover tight commit headroom (`avail >= need`), timeout fallback, and concurrent waiter draining. Happy to defer to whichever approach maintainers prefer.
Decodere commented 2026-11-26 23:44:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T23:44:09Z.


Independent desktop NVIDIA verification of PR #2652 at head 88d7b0a19a276f81491e8430acb5d7dd501ebb1e (1 commit; exact parent & merge-base: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (88d7b0a1)

Command Result
cargo test --release -p xcl --lib tight_commit_headroom_bounds_concurrent_admissions -- --nocapture 1 passed; 0 failed; 0 ignored; 1339 filtered out (0.04s)
cargo test --release -p xcl --lib wanted_burst_never_exceeds_wanted_at_once -- --nocapture 1 passed; 0 failed; 0 ignored; 1339 filtered out (0.01s)
cargo test --release -p xcl --lib wait_for_memory_drains_concurrent_waiters_within_cap -- --nocapture 1 passed; 0 failed; 0 ignored; 1339 filtered out (0.08s)
cargo test --release -p xcl --lib low_commit_unwanted_admits_only_one_progress_slot -- --nocapture 1 passed; 0 failed; 0 ignored; 1339 filtered out (0.00s)
cargo test --release -p xcl --lib gpu::recomp::dxc:: (3 consecutive runs) 24 passed; 0 failed; 0 ignored; 1316 filtered out × 3 (0.44s, 0.44s, 0.43s)
cargo build --release -p xcl --bin xcl Clean build (1m 07s, exit 0)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2652 (88d7b0a19a276f81491e8430acb5d7dd501ebb1e):

xcl-smoke v1
commit: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1631 (PresentX 1631)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14017 MB

Runtime log observations (xcl.log)

  • 9220 log lines, 0 [ERROR] / device-removal / panic lines.
  • Final draw/memory telemetry in log: 19621 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14016 MB committed by the process; video memory 6114 MB local, 4683 MB non-local.

Limits of coverage

  • Serialized dxc::wait_for_memory slot admission under tight commit headroom, concurrent waiter draining, wanted bursts, and single-slot unwanted progress were verified via all 4 new memory_gate_tests and 3× gpu::recomp::dxc:: (24/0/0).
  • The 60 s retail smoke ran on a 32 GB RAM host with the existing warm shader cache, so it confirms zero runtime regression on title: 29640639 rather than reproducing cold DXC commit-pressure bursts (frame-count delta vs. cached parent smoke reflects single-run startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7205807387 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7205807387). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T23:44:09Z. --- Independent desktop NVIDIA verification of **PR #2652** at head `88d7b0a19a276f81491e8430acb5d7dd501ebb1e` (`1` commit; exact parent & merge-base: `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`88d7b0a1`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib tight_commit_headroom_bounds_concurrent_admissions -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1339 filtered out` (`0.04s`) | | `cargo test --release -p xcl --lib wanted_burst_never_exceeds_wanted_at_once -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1339 filtered out` (`0.01s`) | | `cargo test --release -p xcl --lib wait_for_memory_drains_concurrent_waiters_within_cap -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1339 filtered out` (`0.08s`) | | `cargo test --release -p xcl --lib low_commit_unwanted_admits_only_one_progress_slot -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1339 filtered out` (`0.00s`) | | `cargo test --release -p xcl --lib gpu::recomp::dxc::` (3 consecutive runs) | `24 passed; 0 failed; 0 ignored; 1316 filtered out` × 3 (`0.44s`, `0.44s`, `0.43s`) | | `cargo build --release -p xcl --bin xcl` | Clean build (`1m 07s`, exit `0`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, cached baseline on the same machine): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2652 (`88d7b0a19a276f81491e8430acb5d7dd501ebb1e`): ``` xcl-smoke v1 commit: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1631 (PresentX 1631) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14017 MB ``` ### Runtime log observations (`xcl.log`) - `9220` log lines, `0` `[ERROR]` / device-removal / panic lines. - Final draw/memory telemetry in log: `19621 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14016 MB committed by the process; video memory 6114 MB local, 4683 MB non-local`. ### Limits of coverage - Serialized `dxc::wait_for_memory` slot admission under tight commit headroom, concurrent waiter draining, wanted bursts, and single-slot unwanted progress were verified via all 4 new `memory_gate_tests` and 3× `gpu::recomp::dxc::` (`24/0/0`). - The 60 s retail smoke ran on a 32 GB RAM host with the existing warm shader cache, so it confirms zero runtime regression on `title: 29640639` rather than reproducing cold DXC commit-pressure bursts (frame-count delta vs. cached parent smoke reflects single-run startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-28 03:01:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:01:21Z.


merge-check claim
head: 88d7b0a19a

<!-- greyfinch-sync:ivall/xcl:comment:7232742375 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7232742375). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:01:21Z. --- merge-check claim head: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e
throny commented 2026-11-28 03:16:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:16:05Z.


merge-check
base: 753e8b1a
head: 88d7b0a19a
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1516 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: none blocking. The gate is polled every 50 ms as on main, not signalled, so no wake-up can be lost; there is no queue order, as on main, and starvation stays bounded by the per-waiter timeout; a poisoned mutex is recovered and a panic in the wanted check leaks no slot. The wanted check now runs under the gate mutex and takes the demand lock, and nothing holds that lock while calling into the gate (not every closure was traced). The admission rules are main's. For the maintainer: triage marked #1417 as a duplicate of this; no decision yet.
performance: no frame cost. It changes a translator source (dxc.rs is in the hashed list): every tester re-translates the HLSL-path shaders once.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7232933913 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7232933913). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:16:05Z. --- merge-check base: 753e8b1a head: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1516 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored review: none blocking. The gate is polled every 50 ms as on main, not signalled, so no wake-up can be lost; there is no queue order, as on main, and starvation stays bounded by the per-waiter timeout; a poisoned mutex is recovered and a panic in the wanted check leaks no slot. The wanted check now runs under the gate mutex and takes the demand lock, and nothing holds that lock while calling into the gate (not every closure was traced). The admission rules are main's. For the maintainer: triage marked #1417 as a duplicate of this; no decision yet. performance: no frame cost. It changes a translator source (dxc.rs is in the hashed list): every tester re-translates the HLSL-path shaders once. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
KOLESNiii commented 2026-11-28 12:05:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T12:05:23Z.


merge-check claim
head: 88d7b0a19a

<!-- greyfinch-sync:ivall/xcl:comment:7238985851 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7238985851). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T12:05:23Z. --- merge-check claim head: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e
KOLESNiii commented 2026-11-28 12:40:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T12:40:12Z.


merge-check
base: e429936c10
head: 88d7b0a19a
merge: clean
build: cargo build --workspace -> ok; the test build (cargo test --workspace --no-run) -> failed: error[E0428]: the name memory_gate_tests is defined multiple times (crates\xcl\src\gpu\recomp\dxc.rs:2009, previous definition at :1890)
tests: not run (the lib test target does not compile on the merge)
review: not repeated in full: the diff adds a second mod memory_gate_tests to dxc.rs with four tests (tight_commit_headroom_bounds_concurrent_admissions, wanted_burst_never_exceeds_wanted_at_once, wait_for_memory_drains_concurrent_waiters_within_cap, low_commit_unwanted_admits_only_one_progress_slot); main already has a module of that name with the same four tests (commit a34eaed4, merged with #2959), so on main the diff is a duplicate.
performance: no runtime change (test-only diff).
verdict: not yet: the test build fails on the merge (duplicate module; main already has these tests); drop them or rebase onto main
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge defff6e520a0801abfc05bc616a28a40d2a5ced6 (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).

<!-- greyfinch-sync:ivall/xcl:comment:7239386231 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7239386231). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T12:40:12Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e merge: clean build: cargo build --workspace -> ok; the test build (cargo test --workspace --no-run) -> failed: error[E0428]: the name `memory_gate_tests` is defined multiple times (crates\xcl\src\gpu\recomp\dxc.rs:2009, previous definition at :1890) tests: not run (the lib test target does not compile on the merge) review: not repeated in full: the diff adds a second `mod memory_gate_tests` to dxc.rs with four tests (tight_commit_headroom_bounds_concurrent_admissions, wanted_burst_never_exceeds_wanted_at_once, wait_for_memory_drains_concurrent_waiters_within_cap, low_commit_unwanted_admits_only_one_progress_slot); main already has a module of that name with the same four tests (commit a34eaed4, merged with #2959), so on main the diff is a duplicate. performance: no runtime change (test-only diff). verdict: not yet: the test build fails on the merge (duplicate module; main already has these tests); drop them or rebase onto main hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge defff6e520a0801abfc05bc616a28a40d2a5ced6 (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
futurepro62 commented 2026-12-01 05:54:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-12-01T05:54:31Z.


merge-check
base: d0832e614f
head: 88d7b0a19a
merge: clean
build: cargo build --workspace -> ok
tests: not run: cargo test --workspace --no-run fails on the merge with E0428, memory_gate_tests defined twice (crates/xcl/src/gpu/recomp/dxc.rs, main's at line 2354, this PR's at 2473)
review: this PR is already on main, byte for byte. git patch-id --stable of its diff against its merge base (b49be183) is dd611ebb…, the same as main's a34eaed4 ("Recompiler: serialize dxc::wait_for_memory slot admission", bmjask, landed with #2959). All 101 distinct lines it adds are in main's dxc.rs. Git merges the code once but adds the test module a second time, hence the error. throny's "safe to merge" was on an older base, before #2959; KOLESNiii's "not yet" is right about the merge. Nothing is left to merge. The PR can be closed as carried by #2959 (author credit is the maintainer's call).
performance: none: no change against main.
verdict: not yet: already on main (identical patch to a34eaed4 via #2959); the merge's test build fails on the duplicate module, close or rebase to nothing
hardware / tool and model: RTX 5070 Ti 16 GB + AMD Radeon iGPU, Ryzen 7 9800X3D, Windows 11 26300 (no suite ran: the test build fails). Claude Code, Claude Opus 5.5: merge, build, test build, patch-id comparison and review.

<!-- greyfinch-sync:ivall/xcl:comment:7302266590 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7302266590). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-12-01T05:54:31Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 88d7b0a19a276f81491e8430acb5d7dd501ebb1e merge: clean build: cargo build --workspace -> ok tests: not run: `cargo test --workspace --no-run` fails on the merge with E0428, `memory_gate_tests` defined twice (`crates/xcl/src/gpu/recomp/dxc.rs`, main's at line 2354, this PR's at 2473) review: this PR is already on `main`, byte for byte. `git patch-id --stable` of its diff against its merge base (`b49be183`) is `dd611ebb…`, the same as main's `a34eaed4` ("Recompiler: serialize dxc::wait_for_memory slot admission", bmjask, landed with #2959). All 101 distinct lines it adds are in main's `dxc.rs`. Git merges the code once but adds the test module a second time, hence the error. throny's "safe to merge" was on an older base, before #2959; KOLESNiii's "not yet" is right about the merge. Nothing is left to merge. The PR can be closed as carried by #2959 (author credit is the maintainer's call). performance: none: no change against `main`. verdict: not yet: already on `main` (identical patch to a34eaed4 via #2959); the merge's test build fails on the duplicate module, close or rebase to nothing hardware / tool and model: RTX 5070 Ti 16 GB + AMD Radeon iGPU, Ryzen 7 9800X3D, Windows 11 26300 (no suite ran: the test build fails). Claude Code, Claude Opus 5.5: merge, build, test build, patch-id comparison and review.
Foniass commented 2026-12-01 08:34:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:34:38Z.


Triage (#1607) – head 88d7b0a

This change is already on main: commit a34eaed4 (same title, "Recompiler: serialize dxc::wait_for_memory slot admission") has the same gpu/recomp/dxc.rs diff as this PR's commit 88d7b0a: the MemoryGate mutex around the admission check plus the four threaded tests. Only the hunk offsets differ.
#1417 fixes the same race with a compare-exchange loop instead.
Recommendation: close (superseded by main commit a34eaed4).

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:7305500946 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7305500946). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:34:38Z. --- **Triage (#1607)** – head 88d7b0a This change is already on main: commit a34eaed4 (same title, "Recompiler: serialize dxc::wait_for_memory slot admission") has the same `gpu/recomp/dxc.rs` diff as this PR's commit 88d7b0a: the `MemoryGate` mutex around the admission check plus the four threaded tests. Only the hunk offsets differ. #1417 fixes the same race with a compare-exchange loop instead. Recommendation: close (superseded by main commit a34eaed4). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:56:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:56:53Z.


Closing as superseded: this change is already on main (a34eaed4). main commit a34eaed4 has a dxc.rs patch identical line for line to PR head 88d7b0a1 (diffed)

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311880197 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2652#issuecomment-7311880197). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:56:53Z. --- Closing as superseded: this change is already on `main` (a34eaed4). main commit a34eaed4 has a dxc.rs patch identical line for line to PR head 88d7b0a1 (diffed) Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

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!2642
No description provided.