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

Hotfix/incorrect mask positions #1103

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Mar 7, 2023

This PR fixes an issue found by @antonwolfy where the following test would not clear the assertion:

import dpctl.tensor as dpt
m = dpt.full((60, 80,), True)
assert m[m].size == m.size

This was caused by inclusive_scan_rec implementation unconditionally applying non-zero indicator transformation on the input data, even for the recursive call where it was unintended.

The fix is to add the transformer argument to the function, and set to it to no-op for the recursive call.

A test is added.

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

The main step of the algorithm was unconditionally applying non-zero transformer
to the input data, but this should not be done on the recursive call.
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the hotfix/incorrect-mask-positions branch from 09d3d87 to 3eed4e5 Compare March 7, 2023 19:16
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.

@oleksandr-pavlyk, thank you! LGTM!

@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 82.378%. Remained the same when pulling 3eed4e5 on hotfix/incorrect-mask-positions into e779c6a on master.

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Array API standard conformance tests for dpctl=0.14.1=py310h76be34b_3 ran successfully.
Passed: 36
Failed: 798
Skipped: 280

@oleksandr-pavlyk oleksandr-pavlyk merged commit 7656259 into master Mar 7, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the hotfix/incorrect-mask-positions branch March 7, 2023 20:01
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Array API standard conformance tests for dpctl=0.14.1=py310h76be34b_3 ran successfully.
Passed: 36
Failed: 798
Skipped: 280

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