Skip to content

Fix gh-1293 for sum over zero-size array with keepdims set #1294

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 2 commits into from
Jul 20, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Closes gh-1293

This PR adds handling of keepdims=True case for special-case early exit for zero-size input.

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

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the fix-gh-1293-sum-keepdims-true branch from 8413c78 to a4e357f Compare July 20, 2023 18:53
@github-actions
Copy link

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 83.218% (+0.02%) from 83.203% when pulling a4e357f on fix-gh-1293-sum-keepdims-true into af302a5 on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev0=py310h7bf5fec_12 ran successfully.
Passed: 475
Failed: 525
Skipped: 119

Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

I've tested with dpnp from #1488 and all tests are passing now. Thank you @oleksandr-pavlyk !

@oleksandr-pavlyk oleksandr-pavlyk merged commit e86ba87 into master Jul 20, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-gh-1293-sum-keepdims-true branch July 20, 2023 22:08
@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.6dev0=py310h7bf5fec_12 ran successfully.
Passed: 475
Failed: 525
Skipped: 119

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.

dpt.sum with "keepsdims" returns incorrect shape in case one or more axis is equal to 0
3 participants