Skip to content

Fixed behavior of mathematical functions for scalars. #1233

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 1 commit into from
Jun 7, 2023

Conversation

npolina4
Copy link
Contributor

@npolina4 npolina4 commented Jun 7, 2023

Fixed behavior of mathematical functions for floating-point and complex floating-point scalars.
Added test.
Resolves #1219
Resolves IntelPython/dpnp#1304

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

@github-actions
Copy link

github-actions bot commented Jun 7, 2023

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 84.054% (+0.02%) from 84.035% when pulling 4a09766 on fix_multiply_scalar_dtype into 1596a13 on master.

@github-actions
Copy link

github-actions bot commented Jun 7, 2023

Array API standard conformance tests for dpctl=0.14.3dev3=py310h7bf5fec_15 ran successfully.
Passed: 273
Failed: 727
Skipped: 119

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.

To demonstrate some changes of behavior

before this PR:

In [20]: dpt.add(dpt.asarray(3, dtype="c8"), 3j)
Out[20]: usm_ndarray(3.+3.j)

(dtype is dpt.complex128, which is incorrect as per NEP-050)

after:

In [6]: dpt.add(dpt.asarray(3, dtype="c8"), 3j)
Out[6]: usm_ndarray(3.+3.j, dtype=complex64)

@npolina4 npolina4 merged commit 6bb09e7 into master Jun 7, 2023
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

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

@github-actions
Copy link

github-actions bot commented Jun 7, 2023

Array API standard conformance tests for dpctl=0.14.3dev3=py310h7bf5fec_16 ran successfully.
Passed: 321
Failed: 679
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk deleted the fix_multiply_scalar_dtype branch June 10, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants