Skip to content

Implemented dpctl.tensor.meshgrid and tests - #920

Merged
oleksandr-pavlyk merged 3 commits into
masterfrom
meshgrid-constructor
Oct 10, 2022
Merged

oleksandr-pavlyk merged 3 commits into
masterfrom
meshgrid-constructor

Conversation

@ndgrigorian

@ndgrigorian ndgrigorian commented Oct 3, 2022 •

Copy link
Copy Markdown
Collaborator
  • 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

github-actions Bot commented Oct 3, 2022

Copy link
Copy Markdown

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

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

coveralls commented Oct 5, 2022 •

Copy link
Copy Markdown
Collaborator

Coverage Status

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

@github-actions

github-actions Bot commented Oct 5, 2022

Copy link
Copy Markdown

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

@oleksandr-pavlyk

oleksandr-pavlyk commented Oct 9, 2022 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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.

Comment thread dpctl/tensor/_ctors.py Resolved
Comment thread dpctl/tensor/_ctors.py Resolved

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Oct 9, 2022

Copy link
Copy Markdown

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

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

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

@ndgrigorian

Copy link
Copy Markdown
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
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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