Repository navigation
test(cuda.core): pop the context when the init_cuda leftover warning aborts setup - #3082
Merged
Merged
Conversation
Contributor
Contributor
Author
|
/ok to test d0bce1a |
Contributor
|
…t_cuda setup UnreleasedMemoryResourceWarning is escalated to an error and was raised before the fixture try, so teardown never popped the context. Raise it inside the try, and correct the VA-count comment that attributed the NVIDIA#2381 pool leaks to cuMemAddressReserve.
juenglin
force-pushed
the
init-cuda-followup
branch
from
October 12, 2026 20:18
d0bce1a to
a32461f
Compare
Contributor
Author
|
/ok to test a32461f |
juenglin
marked this pull request as ready for review
October 12, 2026 20:28
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⚪ Not assessed Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue is identified; the PR is mergeable after normal checks. Comment ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
|
Andy-Jost
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #3053. The successful path is unchanged; this makes
init_cudaclean up when its setup aborts.pytest.iniescalatesUnreleasedMemoryResourceWarningto an error, andinit_cudaraises it during setup, afterset_current(). The raise used to happen before the fixture'stry, so thefinallynever ran and the context stayed current. Now everything afterset_current()runs inside thetry: theCUDA_CORE_TEST_BLOCKING_SYNCflag, the leftover check, and the live-count snapshot. If the warning fires, teardown still synchronizes and pops the context, and it skips the collect comparison that needs the snapshot. A failingset_current()still raises before thetry, because nothing has been changed yet that would need undoing.test_escalated_setup_warning_still_pops_the_contextdrives that path. It sets the error filter itself, so it does not depend onpytest.inior command-line warning options. It fails against the previousconftest.py.The comment on the VA-reservation counter in
virtual_memory.cppnow states that memory-pool VA windows are not included: owned pools have their own count, and the device default pool is a borrowed reference that is not counted.Checklist