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

Fix search reductions giving incorrect results for F-contiguous inputs #1462

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

ndgrigorian
Copy link
Collaborator

This pull request restricts calls of contiguous variants for search reductions, now excluding cases where F-contiguous data is reduced to a single value.

These cases would return the index as if counting down columns rather than counting along the rows.

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

``py_search_over_axis`` no longer calls the ``axis1`` contiguous variant

``py_search_over_axis`` now only calls ``axis0`` variant wh
@ndgrigorian ndgrigorian requested a review from vtavana November 1, 2023 05:17
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 85.748%. remained the same when pulling 064a44c on fix-search-reductions-contig-cases into 9131925 on master.

Copy link

github-actions bot commented Nov 1, 2023

Copy link

github-actions bot commented Nov 1, 2023

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_75 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk self-requested a review November 1, 2023 16:04
Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @ndgrigorian!
It works fine now.

x=[[1, 2, 3],[6, 5, 4]]
numpy.argmax(numpy.array(x, order='F'))
3

dpt.argmax(dpt.asarray(x, order='F'))
usm_ndarray(3)

@ndgrigorian ndgrigorian merged commit 11ecba8 into master Nov 1, 2023
26 checks passed
@ndgrigorian ndgrigorian deleted the fix-search-reductions-contig-cases branch November 1, 2023 17:28
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.

4 participants