Skip to content

dpt.cumulative_sum returns incorrect result for dtype=dpt.bool #2017

Closed

Description

@ndgrigorian

Similar to previously closed issue for reductions #1944

import dpctl.tensor as dpt
a = dpt.asarray([-1, 1], dtype=dpt.int32)
dpt.cumulative_sum(a)
# usm_ndarray([-1, 0])
dpt.cumulative_sum(a, dtype=dpt.bool)
# usm_ndarray([True, False])

# expected
dpt.cumulative_sum(dpt.astype(a, dpt.bool), dtype=dpt.bool)
# usm_ndarray([True, True])

Activity

  1. self-assigned this
    on Feb 24, 2025
  2. added
    bug
    on Feb 24, 2025
  3. added a commit that references this issue on Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions