[UR][L0V2] implement host-mediated buffer migration fallback#22152
Open
kweronsx wants to merge 1 commit into
Open
[UR][L0V2] implement host-mediated buffer migration fallback#22152kweronsx wants to merge 1 commit into
kweronsx wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces the UR_RESULT_ERROR_UNSUPPORTED_FEATURE failure in ur_discrete_buffer_handle_t::getDevicePtr (Level Zero v2 adapter) with a host-mediated migration fallback when peer-to-peer access between the active allocation device and the requested device is unavailable. The fallback allocates a temporary USM host buffer, copies device→host from the active allocation, then host→device into the target allocation via migrateBufferTo, and updates activeAllocationDevice.
Changes:
- Removes the unconditional throw on the non-P2P path and downgrades the log to DEBUG with a migration message.
- Adds a temporary USM host allocation (RAII-guarded via
usm_unique_ptr_t) and performs source-device→host→target-device copies usingsynchronousZeCopyandmigrateBufferTo. - Sets
activeAllocationDeviceto the target device and returns the offset pointer into the new active allocation.
116faca to
75ea41d
Compare
Contributor
|
@kweronsx Rebase on the current sycl branch so that CI builds could start. |
75ea41d to
6fbeb9d
Compare
When two devices lack P2P access, getDevicePtr() was unconditionally throwing UR_RESULT_ERROR_UNSUPPORTED_FEATURE instead of migrating the buffer through a temporary host allocation. Implement the fallback: copy active-device -> host -> target device, then update activeAllocationDevice. Resumes work on intel#22010 Issue: https://jira.devtools.intel.com/browse/URT-1171
6fbeb9d to
1abfeb7
Compare
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.
When two devices lack P2P access, getDevicePtr() was unconditionally throwing UR_RESULT_ERROR_UNSUPPORTED_FEATURE instead of migrating the buffer through a temporary host allocation. Implement the fallback: copy active-device -> host -> target device, then update activeAllocationDevice.
Issue: URT-1171