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

Performance: in-place dpctl.tensor.add with strides #1278

Open
npolina4 opened this issue Jul 12, 2023 · 1 comment
Open

Performance: in-place dpctl.tensor.add with strides #1278

npolina4 opened this issue Jul 12, 2023 · 1 comment

Comments

@npolina4
Copy link
Collaborator

import dpctl.tensor as dpt
a = dpt.ones((8192, 8192), dtype='i4', device='cpu')
b = dpt.ones((8192 + 2, 8192 + 2), dtype='i4', device='cpu')
%timeit b[2:, 2:]+=a
#209 ms ± 36.8 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

import numpy
a_np = numpy.ones((8192, 8192), dtype='i4')
b_np = numpy.ones((8192 + 2, 8192 + 2), dtype='i4')
%timeit b_np[2:, 2:]+=a_np
#75.7 ms ± 1.31 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
@npolina4 npolina4 changed the title Performance: in-place dpctl.tensor.add with strides performance Performance: in-place dpctl.tensor.add with strides Jul 12, 2023
@oleksandr-pavlyk
Copy link
Collaborator

This was addressed and should be closed.

oleksandr-pavlyk added a commit that referenced this issue Aug 15, 2023
Provides an alternative implementation of std::abs for complex types
via std::hypot which is used on Windows.
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

No branches or pull requests

2 participants