Skip to content

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

Closed
@ndgrigorian

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])

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions