-
Notifications
You must be signed in to change notification settings - Fork 226
Add tests for peer device support with IPC-shared buffers #1308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Contributor
Contributor
Author
|
/ok to test 732f7ae |
This comment has been minimized.
This comment has been minimized.
- Convert test_object_passing function to TestObjectPassing class - Follow the same pattern as other IPC tests (test_main/child_main methods) - Update .cursorrules to note build requirement before running tests
Update test fixtures to set device 0 current (avoids inter-test dependencies with multiple devices available). - Create tests/memory_ipc/test_peer_access.py with TestPeerAccessNotPreservedOnImport - Verify peer access settings are not preserved when MR is sent via IPC - Verify peer access can be set after import - Move mempool_device_x2/x3 fixtures to conftest.py for reuse - Update device fixtures to explicitly use Device(0) for consistency - Remove duplicate fixture definitions from test_memory_peer_access.py
- Add TestBufferPeerAccessAfterImport test class - Verify buffers imported via IPC can be accessed from peer devices after setting peer access - Verify peer access can be revoked after being granted - Parametrize test to run with and without peer access granted in parent process - Test verifies full lifecycle: import -> grant access -> verify access -> revoke access -> verify revocation - Uses PatternGen.verify_buffer directly (simpler than manual scratch buffers)
2929d77 to
03ef0d1
Compare
Contributor
Author
|
/ok to test 03ef0d1 |
Contributor
Author
|
/ok to test 11edd04 |
11edd04 to
818ea1c
Compare
Contributor
Author
|
/ok to test 818ea1c |
leofang
approved these changes
Dec 4, 2025
|
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.
Summary
Adds tests verifying that peer access settings are not preserved when memory resources are shared via IPC, and that buffers imported via IPC can be accessed from peer devices after setting peer access on the imported memory resource.
Related to #479
Changes
New test file:
tests/memory_ipc/test_peer_access.pyTestPeerAccessNotPreservedOnImport: Verifies peer access settings are not preserved on IPC import (as per CUDA documentation section 15.11.2)TestBufferPeerAccessAfterImport: Verifies buffers can be accessed from peer devices after setting peer access, and that access can be revokedTest infrastructure improvements:
mempool_device_x2andmempool_device_x3fixtures toconftest.pyfor reuse across test filesipc_device,mempool_device) to explicitly useDevice(0)for consistencytest_memory_peer_access.pyTest refactoring:
test_object_passingto use class-based structure matching other IPC testsTest Coverage
The tests verify:
Related Work
Testing
All tests pass on 2-GPU system with peer access enabled.