Skip to content

Commit fbdef88

Browse files
Updated use_queue_device example for changes in dpctl and pybind11 integration
1 parent 23b9e04 commit fbdef88

File tree

1 file changed

+4
-6
lines changed
  • examples/pybind11/use_dpctl_syclqueue/use_queue_device

1 file changed

+4
-6
lines changed

examples/pybind11/use_dpctl_syclqueue/use_queue_device/_example.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ uint64_t get_device_local_mem_size(sycl::device &d)
4545
}
4646

4747
py::array_t<int64_t>
48-
offloaded_array_mod(sycl::queue &q,
48+
offloaded_array_mod(sycl::queue q,
4949
py::array_t<int64_t, py::array::c_style> array,
5050
int64_t mod)
5151
{
@@ -86,13 +86,11 @@ offloaded_array_mod(sycl::queue &q,
8686

8787
PYBIND11_MODULE(_use_queue_device, m)
8888
{
89-
// Import the dpctl extensions
90-
import_dpctl();
9189
m.def(
9290
"get_max_compute_units",
93-
[=](sycl::queue &q) -> size_t {
94-
return q.get_device()
95-
.get_info<sycl::info::device::max_compute_units>();
91+
[=](sycl::queue q) -> size_t {
92+
sycl::device d = q.get_device();
93+
return d.get_info<sycl::info::device::max_compute_units>();
9694
},
9795
"Computes max_compute_units property of the device underlying given "
9896
"dpctl.SyclQueue");

0 commit comments

Comments
 (0)