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

Implemented dpctl.tensor.meshgrid and tests #920

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

ndgrigorian
Copy link
Collaborator

@ndgrigorian ndgrigorian commented Oct 3, 2022

  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

Implements dpctl.tensor.meshgrid constructor which returns a matrix of coordinates. Implemented as per array API standard.

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

@oleksandr-pavlyk
Copy link
Collaborator

Can you please either merge main branch into this PR, or rebase it on top of the main branch to fix the CI?

@ndgrigorian ndgrigorian force-pushed the meshgrid-constructor branch from ea53914 to ddb68e8 Compare October 5, 2022 17:38
@coveralls
Copy link
Collaborator

coveralls commented Oct 5, 2022

Coverage Status

Coverage increased (+0.09%) to 82.093% when pulling 61a7244 on meshgrid-constructor into 7b368a1 on master.

@github-actions
Copy link

github-actions bot commented Oct 5, 2022

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_142.

@oleksandr-pavlyk
Copy link
Collaborator

oleksandr-pavlyk commented Oct 9, 2022

We also need a test for the case when arrays have different allocation queues.

q0 = dpctl.SyclQueue()
x0 = dpt.arange(5, sycl_queue=q0)
q1 = dpctl.SyclQueue()
x1 = dpt.arange(3, sycl_queue=q1)
mgr = dpt.meshgrid((x0,x1))

Is this expected to work with resulting arrays keeping the same allocation queues as inputs for "xy" and appropriate permutation for "ij"? Or should this raise?

@oleksandr-pavlyk
Copy link
Collaborator

We also need a test for the case when arrays have different allocation queues.

Is this expected to work with resulting arrays keeping the same allocation queues as inputs for "xy" and appropriate permutation for "ij"? Or should this raise?

Added test to check for this case.

dpctl/tensor/_ctors.py Outdated Show resolved Hide resolved
dpctl/tensor/_ctors.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @ndgrigorian

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_150.

@oleksandr-pavlyk
Copy link
Collaborator

@ndgrigorian please look over the changes, and let me know if it is ok to merge

@ndgrigorian
Copy link
Collaborator Author

@ndgrigorian please look over the changes, and let me know if it is ok to merge

Changes look great, it should be okay to merge. Thank you @oleksandr-pavlyk.

@oleksandr-pavlyk oleksandr-pavlyk merged commit 72daccc into master Oct 10, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the meshgrid-constructor branch October 10, 2022 16:31
@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 failed to run for dpctl=0.14.0dev0=py310h8c27c75_150.

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