Skip to content

Commit ee09d7b

Browse files
committed
Fix hanging in tril
1 parent c286b52 commit ee09d7b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

dpnp/backend/extensions/vm/div.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ bool can_call_div(sycl::queue exec_q,
219219
{
220220
return false;
221221
}
222+
else if (dst_nd == 0)
223+
{
224+
// don't call OneMKL for 0d arrays
225+
return false;
226+
}
222227

223228
// shapes must be the same
224229
const py::ssize_t* src1_shape = src1.get_shape_raw();

tests/test_mathematical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def test_divide_scalar(shape, dtype):
284284

285285
result = 0.5 / dpnp_a / 1.7
286286
expected = 0.5 / np_a / 1.7
287-
assert_allclose(result, expected)
287+
assert_allclose(result, expected, rtol=1e-6)
288288

289289

290290
@pytest.mark.parametrize("shape",

0 commit comments

Comments
 (0)