Skip to content

Implemented dpctl.tensor.eye constructor and tests - #896

Merged
oleksandr-pavlyk merged 14 commits into
IntelPython:masterfrom
ndgrigorian:dpctl-eye
Sep 13, 2022
Merged

oleksandr-pavlyk merged 14 commits into
IntelPython:masterfrom
ndgrigorian:dpctl-eye

Conversation

@ndgrigorian

@ndgrigorian ndgrigorian commented Aug 29, 2022 •

Copy link
Copy Markdown
Collaborator
  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

eye() returns an array with ones along the kth diagonal, and zeros elsewhere, and is implemented as per the array API standard specification.

@coveralls

coveralls commented Aug 29, 2022 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage increased (+0.01%) to 81.911% when pulling ba3df76 on ndgrigorian:dpctl-eye into 8cf06c6 on IntelPython:master.

Comment thread dpctl/tensor/_ctors.py Resolved
Comment thread dpctl/tensor/_ctors.py Resolved
Comment thread dpctl/tests/test_usm_ndarray_ctor.py Resolved
@ndgrigorian ndgrigorian changed the title Implemented dpctl.eye constructor and tests Implemented dpctl.tensor.eye constructor and tests Aug 30, 2022
Comment thread dpctl/tensor/_ctors.py Resolved
@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

I am seeing some compiler warnings:

~/dpctl/dpctl/tensor/libtensor/source/tensor_py.cpp:485:9: warning: unused parameter 'src_flags' [-Wunused-parameter]
    int src_flags,
        ^
~/dpctl/dpctl/tensor/libtensor/source/tensor_py.cpp:486:9: warning: unused parameter 'dst_flags' [-Wunused-parameter]
    int dst_flags,
        ^
2 warnings generated.
~/dpctl/dpctl/tensor/libtensor/source/tensor_py.cpp:485:9: warning: unused parameter 'src_flags' [-Wunused-parameter]
    int src_flags,
        ^
~/dpctl/dpctl/tensor/libtensor/source/tensor_py.cpp:486:9: warning: unused parameter 'dst_flags' [-Wunused-parameter]
    int dst_flags,
        ^
2 warnings generated.

@oleksandr-pavlyk

oleksandr-pavlyk commented Sep 12, 2022 •

Copy link
Copy Markdown
Contributor

The following input dpt.asnumpy(dpt.eye(5, k=1, dtype='c8', order='F')) on WSL causes my driver to glitch. I will retry, but the input hangs uninterruptibly too.

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

The following input dpt.asnumpy(dpt.eye(5, k=1, dtype='c8', order='F')) on WSL causes my driver to glitch. I will retry, but the input hangs uninterruptibly too.

Must have been transient. Can not observe it anymore.

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

Docstrings need some work:

image

@ndgrigorian

Copy link
Copy Markdown
Collaborator Author

Docstrings need some work:

image

This should be fixed

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

Awesome! Thank you @ndgrigorian

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

Can you please rebase your commit on top of master to get rid of merge commits and then we can merge it.

@ndgrigorian

Copy link
Copy Markdown
Collaborator Author

Can you please rebase your commit on top of master to get rid of merge commits and then we can merge it.

Done

@oleksandr-pavlyk
oleksandr-pavlyk merged commit 4344c83 into IntelPython:master Sep 13, 2022
@ndgrigorian
ndgrigorian deleted the dpctl-eye branch September 13, 2022 16:50
@github-actions

Copy link
Copy Markdown

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_107.

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