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

Do not use wait and throw #1436

Merged
merged 2 commits into from
Oct 14, 2023
Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Oct 12, 2023

This PR arises from improve upon behavior noted in gh-1434

  • Static method dpctl.SyclEvent.wait_for now uses DPCTLEvent_Wait instead of DPCTLEvent_WaitAndThrow, aligning with dpctl.SyclEvent.wait and dpctl.SyclQueue.wait methods.
  • dpctl.SyclAsyncException has been removed
  • Constructor calls to DPCTLQueue_Create and DPCTLContext_Create now pass NULL function pointer for the async handler function
  • The dpctl._sycl_queue.default_async_handler function has been removed.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

The default_async_handler function pointer used previously was not useful,
since the integral argument passed to it by libSyclInterface did not convey
useful information to take meaningful actions, and raising
SyclAsyncErrorException is not helpful.
@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_33 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

@oleksandr-pavlyk
Copy link
Collaborator Author

Thange from using event::wait_and_throw to event::wait will result in asynchronous errors accumulating and will be printed out to cerr during context destruction.

The change in this PR is the correct thing to do.

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

In that case, LGTM

@oleksandr-pavlyk oleksandr-pavlyk merged commit af04d34 into master Oct 14, 2023
25 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the do-not-use-wait-and-throw branch October 14, 2023 00:43
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.

2 participants