Skip to content
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

DPCTLQueue_Memcpy, _Prefetch, _Memadvise become asynchronous #557

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

oleksandr-pavlyk
Copy link
Collaborator

The return value of these functions changed. Declaration, documentation,
tests and implementations updated in dpctl-capi/.

dpctl/_backend.pxd updated for changed return type. Usages updated
accordingly to get the event and wait on it to preserve the behavior
for now.

The return value of these functions changed. Declaration, documentation,
tests and implementations updated in dpctl-capi/.

dpctl/_backend.pxd updated for changed return type. Usages updated
accordingly to get the event and wait on it to preserve the behavior
for now.
@coveralls
Copy link
Collaborator

coveralls commented Aug 28, 2021

Coverage Status

Coverage decreased (-0.001%) to 66.219% when pulling 583fbf7 on feature/DPCTLQueue_Memcpy_async into 832350d on master.

@oleksandr-pavlyk oleksandr-pavlyk changed the title DPCTLQueue_Memcpy, _Prefetch, _Memadvise are not asynchronous DPCTLQueue_Memcpy, _Prefetch, _Memadvise become asynchronous Aug 28, 2021
PokhodenkoSA
PokhodenkoSA previously approved these changes Aug 30, 2021
Copy link
Contributor

@PokhodenkoSA PokhodenkoSA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adarshyoga
Copy link
Contributor

Does this change need an update/addition to test cases?

@oleksandr-pavlyk
Copy link
Collaborator Author

oleksandr-pavlyk commented Aug 31, 2021

Does this change need an update/addition to test cases?

The only change that was needed is in dpctl-capi/tests and was made in this PR. The Python semantics did not change, Python calls remain synchronous. We just replaced previous calls DPCTLQueue_Memcpy(QRef, dst_ptr, src_ptr, num_bytes) with

   ERef = DPCTLQueue_Memcpy(QRef, dst_ptr, src_ptr, num_bytes);
   DPCTLEvent_Wait(ERef);
   DPCTLEvent_Delete(ERef);

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the feature/DPCTLQueue_Memcpy_async branch from 9ba603f to 583fbf7 Compare August 31, 2021 21:09
@oleksandr-pavlyk
Copy link
Collaborator Author

@reazulhoque Is this change ok to merge?

@reazulhoque
Copy link
Contributor

Not yet. I am still getting segfaults when testing Numba-dppy with dpnp.

@PokhodenkoSA
Copy link
Contributor

Not yet. I am still getting segfaults when testing Numba-dppy with dpnp.

@reazulhoque What versions do you use?

@reazulhoque
Copy link
Contributor

I am using Numba-dppy master and testing locally. This is a matter of updating dpnp glue implementations in Numba-dppy to wait for the memcpy event.

@reazulhoque
Copy link
Contributor

Locally all tests passed. Created PR in Numba-dppy IntelPython/numba-dpex#529

@oleksandr-pavlyk oleksandr-pavlyk merged commit 4f187a8 into master Sep 1, 2021
@oleksandr-pavlyk oleksandr-pavlyk deleted the feature/DPCTLQueue_Memcpy_async branch September 1, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants