-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Support UR_DEVICE_INFO_USM_CONTEXT_MEMCPY_SUPPORT_EXP on Cuda #19267
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
Conversation
It's tested by an existing |
5ded23f
to
1561006
Compare
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.
⭐
void *pDst, | ||
const void *pSrc, | ||
size_t Size) { | ||
UR_CHECK_ERROR(cuMemcpyHtoD((CUdeviceptr)pDst, pSrc, Size)); |
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.
Just curious - where in the API does it say that pSrc
is a host pointer and pDst
is a device pointer? I can't find much information about the extension.
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.
Seems you're right, the docs for the function declaration don't mention it explicitly. Are you worried that this call could potentially handle situation where both src and dest are device pointers?
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.
Yeah, or host->host or device->host. It's not clear to me what this API is meant to handle.
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.
I've discussed it offline, you are right, the extension does not give any guarantees about the location of the pointers. I'll put it back to draft to address this issue.
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.
We should be bale to trace the pointers with cuPointerGetAttribute
and CU_POINTER_ATTRIBUTE_MEMORY_TYPE
.
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.
I've moved to cuMemcpy
that automatically handles the provenience of the src/dst pointers.
b07d3fc
to
e84cf2b
Compare
e84cf2b
to
8d70bec
Compare
8d70bec
to
40707c8
Compare
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.
Great!
40707c8
to
cba6baa
Compare
cba6baa
to
5eee551
Compare
This should be ready to roll @intel/llvm-gatekeepers. Thank you. |
This is an optimisation that uses a direct memcopy from host to device.