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

dpt.asarray can now migrate arrays across devices #951

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Within compute follows data programming model, we recommend explicit migration of inputs to the same allocation queue.

This is to be done using usm_ndarray.to_device method, or with dpctl.tensor.asarray operation. This operation until this commit was not able to migrate data across devices.

This commit adds such an ability by copying via host.

Test was added.

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

Within compute follows data programming model, we recommend
explicit migration of inputs to the same allocation queue.

This is to be done using `usm_ndarray.to_device` method, or
with `dpctl.tensor.asarray` operation. This operation until
this commit was not able to migrate data across devices.

This commit adds such an ability by copying via host.

Test was added.
@coveralls
Copy link
Collaborator

Coverage Status

Coverage increased (+0.01%) to 82.058% when pulling 721f9b2 on support-cross-device-asarray into 52773aa on master.

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.0dev0=py310h8c27c75_203 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@oleksandr-pavlyk oleksandr-pavlyk changed the title dpt.asarray can not migrate arrays across devices dpt.asarray can now migrate arrays across devices Oct 25, 2022
@oleksandr-pavlyk oleksandr-pavlyk merged commit d6b7c66 into master Oct 25, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the support-cross-device-asarray branch October 25, 2022 20:08
@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.0dev0=py310h8c27c75_209 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

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.

3 participants