[WIP][UR][CUDA][TEST] Add P2P initialization to multi-device test#21311
Draft
[WIP][UR][CUDA][TEST] Add P2P initialization to multi-device test#21311
Conversation
6adf0fa to
bdf212d
Compare
bdf212d to
8218555
Compare
Fix CUDA adapter to properly map P2P access errors: - Map CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED to UR_RESULT_ERROR_INVALID_OPERATION - Map CUDA_ERROR_PEER_ACCESS_NOT_ENABLED to UR_RESULT_ERROR_INVALID_OPERATION Initialize P2P access in urEnqueueKernelLaunchIncrementMultiDeviceTest: - Add urUsmP2PEnablePeerAccessExp calls in SetUp() for cross-device memcpy - Add urUsmP2PDisablePeerAccessExp calls in TearDown() for cleanup - Skip P2P operations for duplicate device handles (single GPU case) - Accept INVALID_OPERATION for already-enabled or unsupported pairs This fixes test failures on multi-GPU CUDA systems where P2P must be explicitly enabled before cross-device USM memory operations. Fixes #19033
eb4568d to
06a8429
Compare
Changes: - Track enabled P2P pairs in member variable enabledP2PPairs - SetUp: Only record pairs WE successfully enabled (both SUCCESS) - TearDown: Disable P2P bidirectionally for our pairs, ignore errors - Removes global P2P state dependency between test instances Works for both: - 2 physical GPUs duplicated 4× (8 logical devices) - 8 distinct physical GPUs Fixes #19033
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.
Initialize P2P access between device pairs in
urEnqueueKernelLaunchIncrementMultiDeviceTest to enable cross-device USM memcpy operations on CUDA.
This is a test commit to validate the fix on multi-GPU hardware.
Related to #19033