Skip to content

Commit

Permalink
Fix hanging in tril
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Jun 9, 2023
1 parent c286b52 commit ee09d7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dpnp/backend/extensions/vm/div.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ bool can_call_div(sycl::queue exec_q,
{
return false;
}
else if (dst_nd == 0)
{
// don't call OneMKL for 0d arrays
return false;
}

// shapes must be the same
const py::ssize_t* src1_shape = src1.get_shape_raw();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def test_divide_scalar(shape, dtype):

result = 0.5 / dpnp_a / 1.7
expected = 0.5 / np_a / 1.7
assert_allclose(result, expected)
assert_allclose(result, expected, rtol=1e-6)


@pytest.mark.parametrize("shape",
Expand Down

0 comments on commit ee09d7b

Please sign in to comment.