Skip to content

Added support for arrays for fill_value for full() function #982

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 6 commits into from
Nov 16, 2022

Conversation

npolina4
Copy link
Contributor

@npolina4 npolina4 commented Nov 8, 2022

Added support for numpy.ndarray and dpctl.tensor.usm_ndarray for fill_value for dpctl.tensor.full() function.

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

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_57 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@coveralls
Copy link
Collaborator

coveralls commented Nov 8, 2022

Coverage Status

Coverage increased (+0.03%) to 81.978% when pulling a84c615 on fix_full_array_dtype into 31127cb on master.

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Array API standard conformance tests for dpctl=0.14.0dev1=py310h8c27c75_58 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

X = dpt.asarray(
fill_value,
dtype=dtype,
device=device,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
device=device,

Since normalize_queue_device has been called, we only need to use sycl_queue argument.

@oleksandr-pavlyk
Copy link
Contributor

More tests are needed. Check support for working with 0d arrays, e.g.

y_sum = dpt.arange(10, dtype='i4')
x_usm = dpt.full(10, y_usm[3])

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.0rc2=py310h8c27c75_8 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.0rc2=py310h8c27c75_12 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

Copy link
Contributor

@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.

Thank you @npolina4 !

This looks great. Let's wait for the CI and merge.

@oleksandr-pavlyk oleksandr-pavlyk merged commit eb133e9 into master Nov 16, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix_full_array_dtype branch November 16, 2022 22:23
@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 for dpctl=0.14.0rc2=py310h8c27c75_14 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

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