-
Notifications
You must be signed in to change notification settings - Fork 790
[UR][L0] Implement support for device to device copy #16977
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d3fea2b
[UR][L0] Implement support for device to device copy
winstonzhang-intel 833460d
[UR][L0] Implement support for device to device copy
winstonzhang-intel a52376e
[UR][L0] Enable copy test in sycl/test-e2e/bindless_images/copies
winstonzhang-intel b25cf93
[UR][L0] added UNSUPPORTED-INTENDED for e2e tests
winstonzhang-intel 1bcfc50
[UR][L0] Simplified to two cases.
winstonzhang-intel 27efe31
Rebased against llvm/sycl
winstonzhang-intel 2994199
Rebased against llvm/sycl
winstonzhang-intel 0da11e5
Disabled irrelevant tests
winstonzhang-intel 133f31b
Format error correction
winstonzhang-intel c3c5fa4
Testing different pitched images cases
winstonzhang-intel b339a50
testing with before changes
winstonzhang-intel cff04e6
With changes and pitched/unpitched usm to unpitched/pitched usm copy
winstonzhang-intel a76ea40
Temporarily disable tests
winstonzhang-intel 8c1555f
Reenable all tests to start debug
winstonzhang-intel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
sycl/test-e2e/bindless_images/copies/device_to_device_copy.cpp
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
4 changes: 3 additions & 1 deletion
4
sycl/test-e2e/bindless_images/copies/device_to_device_copy_1D_subregion.cpp
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
4 changes: 3 additions & 1 deletion
4
sycl/test-e2e/bindless_images/copies/device_to_device_copy_2D_subregion.cpp
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
3 changes: 1 addition & 2 deletions
3
sycl/test-e2e/bindless_images/copies/device_to_device_pitched.cpp
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if either src->rowPitch or dst->rowPitch = 0, but the other is non-zero, this would imply that the one with value zero is pitched usm, and the one with value non-zero is using the zeImage opaque type. This circumstance does seem to be possible to arrive at if the user mistakenly manually sets a pitch 0 etc.
In such a case the logic will currently assume both are zeImage types and take the other branch that instead calls
zeCommandListAppendImageCopyRegion
.Now I'm not sure that this can be improved upon. But I thought it is worth asking the question of whether the error messaging in this implementation is optimal wrt the above case (and similar). It is a bit cleaner in the cuda backend since there is not the distinction of the two separate apis, since for the cuda backend an opaque type like zeImage doesn't exist for such copy apis: the bare pointers are always passed along with an appropriate descriptor.
I think generally it is important to have tests cases for all types and possible valid inputs (as mentioned here #16977 (comment)) to clarify such issues as the above and make this PR generally easier to review, as well as guarantee that any future breaks of this functionality are flagged from failing tests.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note also that the l0 failures for https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/bindless_images/array/read_write_1d_subregion.cpp and read_write_2d_subregion.cpp can also be pinpointed to failures in these copy functions. These cases correspond to a situation which is dealt with differently in the cuda adapter via the query https://github.com/intel/llvm/blob/sycl/unified-runtime/source/adapters/cuda/image.cpp#L628
However it is not clear to me from examining the l0 spec whether/how this case can be dealt with differently in the l0 backend. It is a device to device copy case, so it would be good to at least clarify at this point whether this overlaps with any of the changes made in this PR, and if when taking into account these additional failures, the changes in this PR might have to be reconsidered.
read_write_1d_subregion.cpp fails due to
"SYCL exception caught! : Enqueue process failed."
This can be pinpointed to triggered asserts that look out of date in the function
getImageRegionHelper
. This is I think a minor issue.However once this is fixed
read_write_1d_subregion.cpp
fails in the same way asread_write_2d_subregion.cpp
:Further investigation reveals that this invalid pointer issue does not occur when commenting out the calls to
ext_oneapi_copy
using these array types.I think that the same issue leads to the failure in
array/read_sampled_array.cpp