Skip to content

Commit eaf8574

Browse files
Added comment, fixed black madness
1 parent dfc0ac8 commit eaf8574

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

dpctl/_memory.pyx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ cdef class _BufferData:
121121
if isinstance(ary_syclobj, dpctl.SyclQueue):
122122
buf.queue = <SyclQueue>ary_syclobj
123123
else:
124-
# FIXME: need a way to construct a queue from
124+
# FIXME: need a way to construct a queue from
125+
# context and device, which can be obtaine from the
126+
# pointer and the context.
127+
# cdef SyclDevice dev = DPPLget_pointer_device(arr_data_ptr, <SyclContext> ary_syclobj)
128+
# cdef SyclQueue new_queue = SyclQueue._create_from_dev_context(dev, <SyclContext> ary_syclobj)
129+
# buf.queue = new_queue
125130
buf.queue = get_current_queue()
126131

127132
return buf

dpctl/tests/test_sycl_usm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ def test_pickling(self):
138138
self.assertEqual(
139139
mobj.tobytes(),
140140
mobj_reconstructed.tobytes(),
141-
"Pickling should preserve buffer content"
141+
"Pickling should preserve buffer content",
142142
)
143143
self.assertNotEqual(
144144
mobj._pointer,
145145
mobj_reconstructed._pointer,
146-
"Pickling/unpickling changes pointer"
146+
"Pickling/unpickling changes pointer",
147147
)
148148

149149

0 commit comments

Comments
 (0)