Skip to content
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

Implemented dpctl.tensor.eye constructor and tests #896

Merged
merged 14 commits into from
Sep 13, 2022

Conversation

ndgrigorian
Copy link
Collaborator

@ndgrigorian ndgrigorian commented Aug 29, 2022

  • 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
Copy link
Collaborator

coveralls commented Aug 29, 2022

Coverage Status

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

dpctl/tensor/_ctors.py Show resolved Hide resolved
dpctl/tensor/_ctors.py Outdated Show resolved Hide resolved
dpctl/tests/test_usm_ndarray_ctor.py Outdated Show resolved Hide resolved
@ndgrigorian ndgrigorian changed the title Implemented dpctl.eye constructor and tests Implemented dpctl.tensor.eye constructor and tests Aug 30, 2022
dpctl/tensor/libtensor/source/tensor_py.cpp Outdated Show resolved Hide resolved
dpctl/tensor/libtensor/source/tensor_py.cpp Outdated Show resolved Hide resolved
dpctl/tensor/libtensor/source/tensor_py.cpp Outdated Show resolved Hide resolved
dpctl/tensor/_ctors.py Show resolved Hide resolved
@oleksandr-pavlyk
Copy link
Collaborator

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

oleksandr-pavlyk commented Sep 12, 2022

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
Collaborator

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
Collaborator

Docstrings need some work:

image

@ndgrigorian
Copy link
Collaborator Author

Docstrings need some work:

image

This should be fixed

Copy link
Collaborator

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

Awesome! Thank you @ndgrigorian

@oleksandr-pavlyk
Copy link
Collaborator

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

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