Skip to content

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

Merged
oleksandr-pavlyk merged 6 commits into
masterfrom
fix_full_array_dtype
Nov 16, 2022
Merged

oleksandr-pavlyk merged 6 commits into
masterfrom
fix_full_array_dtype

Conversation

@npolina4

@npolina4 npolina4 commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Nov 8, 2022

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 8, 2022

Copy link
Copy Markdown

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

@coveralls

coveralls commented Nov 8, 2022 •

Copy link
Copy Markdown
Collaborator

Coverage Status

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

@github-actions

github-actions Bot commented Nov 8, 2022

Copy link
Copy Markdown

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

Comment thread dpctl/tensor/_ctors.py Resolved
Comment thread dpctl/tensor/_ctors.py Outdated
X = dpt.asarray(
fill_value,
dtype=dtype,
device=device,

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.

Suggested change
device=device,

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

@oleksandr-pavlyk

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

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

@github-actions

Copy link
Copy Markdown

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

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

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