Skip to content

DPCTLQueue_Memcpy, _Prefetch, _Memadvise become asynchronous - #557

Merged
oleksandr-pavlyk merged 2 commits into
masterfrom
feature/DPCTLQueue_Memcpy_async
Sep 1, 2021
Merged

oleksandr-pavlyk merged 2 commits into
masterfrom
feature/DPCTLQueue_Memcpy_async

Conversation

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

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

coveralls commented Aug 28, 2021 •

Copy link
Copy Markdown
Collaborator

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

@PokhodenkoSA PokhodenkoSA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@adarshyoga

Copy link
Copy Markdown
Contributor

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

@oleksandr-pavlyk

oleksandr-pavlyk commented Aug 31, 2021 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor Author

@reazulhoque Is this change ok to merge?

@reazulhoque

Copy link
Copy Markdown
Contributor

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

@PokhodenkoSA

Copy link
Copy Markdown
Contributor

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

@reazulhoque What versions do you use?

@reazulhoque

Copy link
Copy Markdown
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
Copy Markdown
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