Skip to content

Bugfix/gh 1874 result type #1877

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

Merged
merged 4 commits into from
Oct 23, 2024
Merged

Conversation

oleksandr-pavlyk
Copy link
Contributor

Closes gh-1874

If inputs consist solely of weak dtypes, pre-prepopulate dtypes lists with scalar behind the first weak_dtypes element.

Add tests that dpt.result_types(sc1, sc2) gives the same result regardless whether the scalar is a Python scalar (weak dtype), or corresponding NumPy scalar (strong dtype).

  • 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?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Oct 23, 2024

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

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_148 ran successfully.
Passed: 895
Failed: 0
Skipped: 119

@coveralls
Copy link
Collaborator

coveralls commented Oct 23, 2024

Coverage Status

coverage: 87.676% (+0.003%) from 87.673%
when pulling dc1887e on bugfix/gh-1874-result_type
into 9eb8f03 on master.

Copy link

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

ndgrigorian
ndgrigorian previously approved these changes Oct 23, 2024
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.

This LGTM, and array API is considering specifying that only scalar types are acceptable in result_type, so this is a subtle change toward supporting the next version of the spec.

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_152 ran successfully.
Passed: 895
Failed: 0
Skipped: 119

Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @oleksandr-pavlyk for fixing it.

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.

Windows tests now passing, LGTM!

@oleksandr-pavlyk oleksandr-pavlyk merged commit 286afae into master Oct 23, 2024
49 of 51 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the bugfix/gh-1874-result_type branch October 23, 2024 21:34
@oleksandr-pavlyk oleksandr-pavlyk mentioned this pull request Nov 20, 2024
8 tasks
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.

dpctl.tensor.result_type raises ValueError
4 participants