Repository navigation
Conversation
The host device takes DXGI's default adapter, which on a laptop with an integrated and a discrete GPU is usually the integrated one, and nothing in the log said which GPU ran. Log its name, vendor, driver, dedicated memory and wave lane range once, and warn when DXGI's high-performance adapter is another GPU (with where to change it in Windows) or when the device runs waves of fewer than 32 lanes, where compute programs that need the console's wave size get no pipeline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Triage verdict — Keep the diagnostics, reconcile with adapter selection ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Logs the host GPU and warns when it isn't the one to run on — multi-GPU diagnostics; useful for the laptop/Optimus class of issues (#1483 related).
DenRakEiw
left a comment
There was a problem hiding this comment.
Tested locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):
cargo test -p victory-gpu --lib adapter::— 3 passed, 0 failedcargo xtask policy— ok (184 files ok)- Clippy CI blocker:
cargo clippy -p victory-gpu --all-targetsreports 1 warning (which fails-D warningsin CI):
warning: unsafe block missing a safety comment
warning: `victory-gpu` (lib) generated 1 warning
Holding off approval until the // SAFETY: comment is added to the undocumented unsafe block.
AI-assisted (Gemini 4 Neon).
…he one to run on
|
Automated triage for the maintainers. The new What it needs:
CI: failing ( Generated by Claude Code |
Claimed in #1633 (claim).
Problem
host::createmakes the device withD3D12CreateDevice(None, …), i.e. DXGI's default adapter. On a laptop with an integrated and a discrete GPU that is usually the integrated one, unless the user set the program to "High performance" in Windows. Nothing in the log says which GPU the run was on, so a report from such a laptop silently describes the iGPU.It matters more on an Intel iGPU: the Intel UHD here runs waves of 16 lanes only (
WaveLaneCountMin/Max16/16, as in #1829). Translated compute programs that depend on lane layout declare the console'sWaveSize(32)/(64)(emitmodule docs), so they get no pipeline there, and the log only shows the refused pipelines.Change
A new
adaptermodule, called once next totdr::log()when the device is made (not on the WARP path):infolinehost GPU: adapter name, vendor id, user-mode driver version, dedicated memory and wave lane range.warnwhen DXGI's high-performance adapter (EnumAdapterByGpuPreference, software adapters ignored) is another GPU than the device's, naming both and where to change it in Windows.warnwhen the device runs waves of at most N < 32 lanes.Logging only. It selects nothing, so it doesn't overlap the adapter selection in #967, #1483 or the selector split out of #1630, and works with whichever lands. With a selector, the first warning simply stops firing.
Tested
Intel UHD Graphics (driver 31.0.101.4146, the default adapter) + RTX 4050 Laptop (595.97), Windows 11.
adapter::tests: the warning rules (other GPU preferred, same GPU, only software preferred, 16 vs 32-64 lanes) and a hardware test on the default device. On this laptop the hardware test prints:cargo test -p victory-gpu --lib: 143 passed, 3 failed. The 3 fail the same way onmain940d32f here (the two view-heap cap tests anda_texture_written_in_one_format_reads_in_another_through_a_placed_view).cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--all-features: clean.rustfmt --checkon the new file: clean.cargo xtask policy: ok.Not run: the title, and the runtime's log with a subscriber (the lines go through
tracingliketdr::log).AI-assisted (Claude Code).
🤖 Generated with Claude Code