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

Introduce _is_host_cpu utility predicate used in __dlpack__ #1784

Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

_is_host_cpu(dl_device) checks if user request export for host CPU device. Recognized inputs are

(1, 0)
(_usmarray.DLDeviceType.kDLCPU, 0)
("kDLCPU", 0)

Add test to exercise __dlpack__ with non-default dl_device keyword arguments

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

Copy link

github-actions bot commented Aug 5, 2024

Copy link

github-actions bot commented Aug 5, 2024

Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_235 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@ndgrigorian
Copy link
Collaborator

@oleksandr-pavlyk
Please fix the pre-commit, then let's merge this in if you don't plan to add more tests, it LGTM

_is_host_cpu(dl_device) checks if user request export for
host CPU device. Recognized inputs are

(1, 0)
(_usmarray.DLDeviceType.kDLCPU, 0)
("kDLCPU", 0)

Add test to exercise __dlpack__ with non-default dl_device
keyword arguments
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the factor-out-dl-device-check branch from 96de932 to 7b6a651 Compare August 5, 2024 18:15
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.

LGTM! Thanks @oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk merged commit d393950 into feature/dlpack-kdlcpu-support Aug 5, 2024
14 of 22 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the factor-out-dl-device-check branch August 5, 2024 18:38
Copy link

github-actions bot commented Aug 5, 2024

Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_235 ran successfully.
Passed: 894
Failed: 1
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