Repository navigation
chore(agc): report heap budgets on buffer allocation failure - #7119
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Full CI on 4b77018 (run 39032496156) fails
|
|
Thanks for the failure report. I traced the counts: when the extension is enabled, |
|
Follow-up: on Linux, the updated |
|
I tried a focused local build of the PR test target at head |
|
Local validation update at the exact head |
jotitadev
left a comment
There was a problem hiding this comment.
@MarcZX100 here is the runtime result you could not get locally. The Linux and Windows CI jobs were also skipped on d9ccae5fd.
Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head d9ccae5fd merged onto main 47a266cf9 (clean). The full tree builds with GCC 15.2, including SrtDescriptorEvaluation.cpp.
| Run | Result |
|---|---|
agc_buffer_pool, agc_buffer_pool_small_device_shared, agc_buffer_pool_small_device_no_staging |
all pass, 3 runs |
same, with BufferPool.hpp and BufferPool.cpp from main |
agc_buffer_pool fails: allocation failure omitted the first heap's memory budget, ... a later heap's memory budget, ... did not query the memory budget for both type selection and its diagnostic |
^agc (649 tests) on the RTX 3070 and on lavapipe |
649/649 on both, same as main |
So the two checks @oneandonlydean reported on 4b770187f pass on this head, and the new checks fail without the change. The missing-extension case passes in both runs, as expected, because main never queries the budget there.
These tests use the mocked Vulkan functions. ANYPS5_GPU (RTX 3070 or lavapipe) does not change the result.
Not run: Windows, a real allocation failure on a device.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Thanks for running the native test matrix. Your result confirms the two original assertions pass on |
d9ccae5 to
4d38213
Compare
4d38213 to
dd81b11
Compare
|
Rebased the PR onto current upstream main at |
|
Thanks for running the focused tests and full AGC suite on |
|
Windows run: With a local print, since removed, AI-assisted |
|
Thanks for tracing the extra call. The pool constructor does query the budget once to size its device tier, which made the test count include setup. In e6fb74f the test explicitly initializes and stores the mock BufferPool before taking its allocation-path count, then asserts exactly two calls for DeviceMemoryType and the allocation-failure diagnostic. The changed test translation unit compiles, and conventions pass. I could not run the focused executable here: it exits at startup because this Xeon E5-1620 v2 lacks the AVX2/LZCNT/BMI/MOVBE/FMA features required by the project. Please rerun the Windows/Linux focused check on this head. |
|
Rechecked AI-assisted |
|
Thanks for rerunning the updated head on Windows. The three buffer-pool tests passing 3/3 each complements the Linux run, where the new checks fail with the production files reverted and the 649-test AGC suite matches main. The Linux/Windows focused behavior is now covered; real allocation failure on a device remains untested. |
|
I am updating #6553 after #5987 merged, retaining only the host-room placement guard and its tests while preserving main's allocation/refusal/reclaim routing. This PR's allocation-failure diagnostics are a separate topic. Both branches already conflict with newer main in the buffer-pool test area. Proposed landing order: #6553 first, then preserve its budget and allocation-attempt assertions alongside this PR's failure diagnostics. No combined build is claimed; if this PR should land first, I can rebase the guard afterward and rerun that composition. AI-assisted: yes |
e6fb74f to
c5f8a3f
Compare
|
Thanks for clarifying the proposed landing order. I agree that #6553 should land first, then this PR should retain its allocation-failure diagnostics together with the guard’s budget and allocation-attempt assertions. Since no combined build has been run, I’ll keep the composition unverified until that combined validation is available. |
|
Checked the heap-budget diagnostic against |
What
Append
VK_EXT_memory_budgetusage and budget for every physical-device heap to failed AGC buffer allocations when the extension query is available. Keep allocation and retry policy unchanged; omit heap details when the extension is unavailable.Tested
BufferPool.cppandtests/BufferPool.cpppassedc++ -std=c++20 -fsyntax-onlywith the repository include paths.agc_buffer_poolcheck exposed incorrect query-count assertions: allocation type selection queries the enabled budget extension, and a failed allocation then queries it again for diagnostics. The test now expects both calls and resets its counter before checking the missing-extension path.d9ccae5fd:agc_buffer_pool,agc_buffer_pool_small_device_sharedandagc_buffer_pool_small_device_no_stagingall passed, three runs each. The full^agcselection passed 649/649 on both an RTX 3070 and lavapipe. WithBufferPool.hppandBufferPool.cppfrommain, the new diagnostic assertions failed as expected. These tests use mocked Vulkan functions; a real allocation failure and Windows were not tested.python3 tools/check_conventions.py --base upstream/main: passed.python3 tools/pr_overlap.py --branch codex/agc-allocation-heap-budget: no overlap with open pull requests.git diff --check: passed.agc_buffer_pool_testsbuild stopped before reaching the changed test at the unrelated GCC parse error incore/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183; no local runtime result is claimed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository