Skip to content

Simplified API for simplify_iteration_space* functions #1188

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 1 commit into from
Apr 25, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

This PR simplifies calling signatures of simplify_iteration_space* functions. Both shape pointer and input strides are const references. Passing strides as vectors obtained using dpctl::tensor::usm_ndarray::get_strides_vector() method allows to do away with passing contiguity flags and itemsize parameter.

Also changed implementation to use STL functions rather than using custom loops for operations such as copying, or scaling.
This should improve performance of stride simplification calls.

  • 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?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_11 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the streamline-iter-space-simplifier-api branch from e40d6c2 to 106b919 Compare April 25, 2023 03:21
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_11 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Modified call sites of these functions to adapt to change of API.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the streamline-iter-space-simplifier-api branch from 106b919 to 6ed8a7a Compare April 25, 2023 12:17
@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 83.317%. Remained the same when pulling 6ed8a7a on streamline-iter-space-simplifier-api into 4a2a79f on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_11 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

LGTM, this is a great change, thanks @oleksandr-pavlyk.

@oleksandr-pavlyk oleksandr-pavlyk merged commit e01e270 into master Apr 25, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the streamline-iter-space-simplifier-api branch April 25, 2023 17:30
@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.3dev1=py310h76be34b_11 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

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