Skip to content

Commit 863c7ad

Browse files
committed
Add test for SyclQueue boxing without parent
1 parent ab22e21 commit 863c7ad

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: 2020 - 2023 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
"""
6+
Tests for boxing for dpnp.ndarray
7+
"""
8+
9+
import dpnp
10+
import pytest
11+
from dpctl import SyclQueue
12+
13+
from numba_dpex import dpjit
14+
15+
16+
def test_boxing_without_parent():
17+
"""Test unboxing of the queue that does not have parent"""
18+
19+
@dpjit
20+
def func() -> SyclQueue:
21+
arr = dpnp.empty(10)
22+
queue = arr.sycl_queue
23+
return queue
24+
25+
q: SyclQueue = func()
26+
27+
assert len(q.sycl_device.filter_string) > 0

0 commit comments

Comments
 (0)