Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests based on gh-2017
  • Loading branch information
ndgrigorian committed Feb 25, 2025
commit 47239cdd6f01bb09e2f010eb82ce2a56c3253776
12 changes: 12 additions & 0 deletions dpctl/tests/test_tensor_accumulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,15 @@ def test_cumulative_sum_gh_1901(p):
inp = dpt.ones(n, dtype=dt)
r = dpt.cumulative_sum(inp, dtype=dt)
assert dpt.all(r == dpt.arange(1, n + 1, dtype=dt))


@pytest.mark.parametrize(
"dt", ["i1", "i2", "i4", "i8", "f2", "f4", "f8", "c8", "c16"]
)
def test_gh_2017(dt):
"See https://github.com/IntelPython/dpctl/issues/2017"
q = get_queue_or_skip()
skip_if_dtype_not_supported(dt, q)
x = dpt.asarray([-1, 1], dtype=dpt.dtype(dt), sycl_queue=q)
r = dpt.cumulative_sum(x, dtype="?")
assert dpt.all(r)