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

SyclPlatform equality testing and hashing implemented #1333

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

oleksandr-pavlyk
Copy link
Collaborator

While testing dpctl in the flat device hierarchy mode I realized we have not implemented equality testing for dpctl.SyclPlatform which caused test test_sycl_context.py::test_multi_device_different_platforms to fail.

This PR implements DPCTLPlatform_AreEq, DPCTLPlatform_Hash, adds tests and implaments dpctl.SyclPlatform.__equal__ and dpctl.SyclPlatform.__hash__ based on these.

Incidentally this PR also corrects declaration of DPCTLContext_Hash which mistakenly used __dpctl_take instead of __dpctl_keep annotation.

  • 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?

@coveralls
Copy link
Collaborator

coveralls commented Aug 10, 2023

Coverage Status

coverage: 84.953% (+0.03%) from 84.923% when pulling e54aaa0 on sycl-platform-equal into b055ff9 on master.

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev1=py310h7bf5fec_37 ran successfully.
Passed: 913
Failed: 87
Skipped: 119

1 similar comment
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev1=py310h7bf5fec_37 ran successfully.
Passed: 913
Failed: 87
Skipped: 119

It is not yet supported on Windows.
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev1=py310h7bf5fec_38 ran successfully.
Passed: 913
Failed: 87
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk merged commit a8d97f3 into master Aug 11, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the sycl-platform-equal branch August 11, 2023 15:42
@oleksandr-pavlyk oleksandr-pavlyk changed the title Sycl platform equal SyclPlatform equality testing and hashing implemented Aug 11, 2023
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev1=py310h7bf5fec_40 ran successfully.
Passed: 913
Failed: 87
Skipped: 119

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