Repository navigation
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Tested on an RTX 4070 Ti SUPER (Ada, 16 GB): Setup
Suite
The command
The limit (#2403's
Both ended in Not tested
Tested and written with Claude Code (Claude Opus 5.5). |
…or pipeline machine code NVIDIA's D3D12 driver keeps 512 MB for the machine code of the pipelines in use and removes the device (0x887a0005) past it. `victory nvprofile [status | install [--mb N] | remove] [--exe NAME]` reads, or writes through NVAPI's driver settings, setting 0x001ABC0F in a profile of its own holding only that setting and the executable. Idea and setting from XCL (xcl-dev/xcl#2590); the code is new. Measured here (RTX 5070 Ti): the driver already ships a profile, "The Culling", for another game's victory.exe, so status reports that profile and install refuses for that name; another name goes with --exe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
By reading only, not run, at
AI use: Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
|
Tested
Update, Not tested: AI use: Claude Code (Claude Opus 5.5) built it, ran the commands and the runs, and wrote this report. |
luckyteagirl
left a comment
There was a problem hiding this comment.
remove() treats every non-NVAPI_OK result from FindProfileByName as “no XCL profile,” so a miscellaneous NVAPI failure can produce a successful exit even when the profile still exists. NVIDIA documents distinct NVAPI_PROFILE_NOT_FOUND and NVAPI_ERROR results for this call. The same error-as-absence pattern in status() makes an ambiguous basename match or a setting-read failure print the driver's default shader heap rather than an error. Could only the explicit profile/application/setting not-found codes map to None/false, with the other statuses propagated through check()? Mocking the DRS calls to return not-found versus NVAPI_ERROR (and ambiguous executable path for status) would verify the CLI exit and message without changing a real driver profile.
This is an exact-head source review of 4bf94d07c280c0adb9b00c2699b6972e64fed22d. I did not invoke NVAPI or modify driver settings. AI-assisted review with Codex.
|
Tested Setup:
What I checked:
Results:
Not tested: more than one run with the profile; AI use: Claude Code (Claude Opus 5.5) built the tree, ran the runs, read the logs, DRED and the event log, and wrote this. The elevated Edit: two more runs with the 1 GiB profile, same build and settings, skip list empty.
Correction: the local compute skip switch I listed under the tree had a side effect, even with an empty list. On every dispatch One more run without it:
So the world-start stall and the TDR after it do not come from that switch. |
|
Thanks @luckyteagirl, confirmed against AI use: Claude Code (Claude Opus 5.5). |
|
Independent Windows/NVIDIA check of #2590 head Windows 11 build 26300, RTX 3080 Ti (12 GB, driver 621.35), rustc 1.99.1 MSVC. A clean exact-head checkout was used.
Not tested here: elevated AI use: Codex (GPT-6.2 Sol) ran the commands and drafted this report. |
|
One profile-ownership case remains on head Could both commands refuse to alter an existing profile until XCL has verified it owns that profile and its contents? For example, mark XCL's application record at creation, then require a user-defined profile with only the expected marked application and profile-local shader setting before reuse or deletion. A focused DRS mock can supply a same-name profile with an unrelated app/setting, and one XCL-created profile later customized by the user; both This is a source/API review; I did not create or change an NVIDIA profile to reproduce it. AI use: Codex (GPT-6.2 Astra) independently checked the NVAPI behavior; Codex (GPT-6.2 Sol) reviewed the code and drafted this comment. |
…ger shader heap (xcl-dev#2403) NVIDIA's D3D12 driver reserves 512 MB of VA for the code of the pipelines in use and removes the device past it. `xcl nvprofile install [--mb N]` writes setting 0x001ABC0F for xcl.exe into a profile of XCL's own through NVAPI DRS (elevated, once); `status` reads it, `remove` deletes the profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@thehollowedone thanks, agreed:
Tested (RTX 3090 24 GB, 621.40, Windows 11 26300, release):
Not tested: AI use: Claude Code (Claude Opus 5.5) wrote the change and the test, checked the NVAPI IDs and signatures against NVIDIA's headers, ran the tests, and drafted this. Checked by me before posting. |
|
Follow-up, by reading only at AI use: Claude Code (Claude Opus 5.5) checked the new head and wrote this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
NVIDIA's D3D12 driver reserves 512 MB of VA for the machine code of the pipelines in use and removes the device (
0x887a0005) when a submission needs more (#2403). Setting0x001ABC0Fin a driver profile raises that reserve; NVIDIA's own profiles use 1 or 2 GiB for big titles. This addsxcl nvprofile, which writes that one setting forxcl.exethrough NVAPI, so users don't have to find it in Profile Inspector. Part of #2403. The measurements are in my comment there.It is opt-in and changes nothing at run time: nothing happens unless the user runs the command. It moves the wall and does not replace using less code (#2526, #1901, #2496).
What is in it
crates/xcl/src/gpu/nvprofile.rs(new):nvapi64.dllthroughnvapi_QueryInterface,NvAPI_DRS_*.installputs the exe into a profile of its own,XCL (xcl-dev), holding only this setting, soremovedeletes exactly that.statusreads what the driver will use. Beforeinstallreuses a profile of that name orremovedeletes it, both check that it holds nothing butxcl.exeand this setting (NvAPI_DRS_GetProfileInfo,NvAPI_DRS_EnumApplications), and refuse otherwise, so a same-name profile someone else made is left alone. Tests: the NVAPI struct sizes, the command line, the ownership rule.crates/xcl/src/main.rs: thexcl nvprofile [status | install [--mb N] | remove]subcommand and its help text.--mbtakes 512 to 4095 (4096 MB would not fit in the setting's u32), default 1024.README.md: one line in the command list.Writing needs an elevated prompt once: without it
NvAPI_DRS_SetSettingreturns-137(NVAPI_INVALID_USER_PRIVILEGE) and nothing is saved, and the command says so. Later unelevated runs get the larger heap, because the driver matches the profile by exe name. Reading needs no elevation.Tested
RTX 3090 24 GB, NVIDIA 621.40, i5-13600K, Windows 11 26300, Rust 1.99.1 (MSVC), debug for the suite, release for the runs.
At
75b72d2f(onmainb49be18):cargo build --release --workspace+cargo test --release --workspace -- --test-threads=4: 1439 passed, 0 failed, 47 ignored; 28 SKIPPED (no wave64 and the like on this adapter). At004fa0f6, debug: 1438 passed, 0 failed, 47 ignored.Review fix (profile ownership):
ownedis unit-tested (only_a_profile_xcl_could_have_made_is_changed: a same-name profile with another app, an extra setting, or a predefined profile is refused; whatinstallleaves is accepted). Read-only against the real driver with a temporary local test: the profileinstallmade here read as 1 application (xcl.exe) and 1 setting, accepted forxcl.exeand refused when onlyother.exewas expected; nothing was saved.Review fixes:
--mb 4096is refused (it wrapped to a 0-byte heap); only NVAPI's not-found codes (-160, -163, -166, checked againstnvapi_lite_common.h) read as "no profile", any other status (e.g.NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS, -182) is an error instatus,removeandinstall. Unit tests for both; the DRS calls themselves are not mocked.28
SKIPPEDlines: the wave64 tests (no wave64 on this adapter), per-lane f16/f32 forms refused, and the const-mask case.The new tests:
gpu::nvprofile::tests::struct_sizes_match_nvapi,the_command_line_is_checked: pass.xcl nvprofileunelevated: shows the default 512 MB forxcl.exe.xcl nvprofile installunelevated: refused with the elevation message, exit 1, nothing written.The same module, from NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403's
shader_code_limit.rswith its own exe put into the profile (elevated install, then an unelevated run): removal at 262 pipelines / 448 MB without the profile, 519 / 888 MB at 1 GiB, 1,028 / 1,760 MB at 2 GiB. Reading NVIDIA's own Fortnite profile gives0x80000000, as Profile Inspector shows.Retail 1.0.2.1 in the world, with and without the profile written by this (same binary
4bf94d0, one copy namedxcl-noprofile.exeso the driver gives it no profile, back to back from the same caches;XCL_DIRECT_DXIL=1 XCL_DRED=1, 480 s, A pressed by script). Compute pipelines precompiled with--used-onlyusing Shaders: --precompile --pipelines also builds a split program's whole form #2551's precompiler, so no compute pipeline was built cold at the world start:xcl nvprofile install --mb 10240x887a0005at 102.5 s, DRED page fault at VA 0x0 with no allocations, then0x80000003)With the profile the title showed the first in-world output on this machine: world audio and on-screen text. But frames were very slow (about 70 in the 400 s after the world start), with green flashes and 17 compute + 8 graphics pipelines still built cold. So this shows the device staying alive, not a playable world. The shader code in use was not counted in these runs.
On
nvidia-devaf2cecc4+ Shaders: --precompile --pipelines also builds a split program's whole form #2551 (RTX 3090, same cache state), 1 GiB was not enough: the device was removed in 2 of 2 runs at--mb 1024(341 s, 199.6 s) and in 0 of 2 at--mb 2048(480 s each); details. @Anon64 saw the same on that tree on an RTX 3060, so--mb 2048may be the better choice onnvidia-dev.Regression run
main:
this PR:
The
mainrun was first after the build, and its lower frame count is most likely its cold caches. The code here is not called at run time.Not tested
installandremoverefusing a real same-name profile made by someone else (none was created in the driver); the DRS calls are not mocked.xcl nvprofile installandremovethroughxcl.exeitself, elevated. The same functions were tested elevated through the test above.AI use
🤖 Generated with Claude Code