Skip to content

Conversation

@npolina4
Copy link
Contributor

@npolina4 npolina4 commented Nov 13, 2023

Added support for weak scalars data type.

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

@coveralls
Copy link
Collaborator

coveralls commented Nov 13, 2023

Coverage Status

coverage: 90.187% (+0.2%) from 89.993%
when pulling 01e9d9c on fix_result_type
into 700079f on master.

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev2=py310ha25a700_2 ran successfully.
Passed: 1022
Failed: 51
Skipped: 60

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev2=py310ha25a700_3 ran successfully.
Passed: 1022
Failed: 51
Skipped: 60

It handles scalars consistently with the way elementwise
operations do, following NEP-0050.

Some definitions were migrated from _elementwise_common
to _type_utils.
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_3 ran successfully.
Passed: 896
Failed: 13
Skipped: 86

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_4 ran successfully.
Passed: 894
Failed: 15
Skipped: 86

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_5 ran successfully.
Passed: 890
Failed: 19
Skipped: 86

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_5 ran successfully.
Passed: 892
Failed: 17
Skipped: 86

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_5 ran successfully.
Passed: 893
Failed: 16
Skipped: 86

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.

Behavior for Numpy scalars seems worth noting
(the device does not support fp64)

In [9]: dpt.result_type(dpt.empty(0, dtype="f4"), np.float64(2))
Out[9]: dtype('float32')

But we usually treat them as Python scalars anyway, so I don't see a reason to change anything here.

Overall LGTM!

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.

4 participants