Skip to content

Commit bba7b6e

Browse files
committed
address review comments
1 parent e9b784b commit bba7b6e

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

dpctl/_sycl_queue.pyx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,9 @@ cdef class SyclQueue(_SyclQueue):
11801180
Keeps objects in ``args`` alive until tasks associated with events
11811181
complete.
11821182
1183-
Deprecated since dpctl 0.23.0. Use :func:`dpctl.keep_args_alive`
1184-
instead, which is not bound to a queue and returns nothing.
1183+
Deprecated. Use :func:`dpctl.keep_args_alive` instead, which is not
1184+
bound to a queue and returns nothing. The event returned by this
1185+
function is already complete.
11851186
11861187
Args:
11871188
args(object):
@@ -2064,12 +2065,7 @@ def keep_args_alive(args, depends):
20642065
20652066
Increments the reference count of ``args`` and schedules the matching
20662067
decrement to run on a background thread once every event in ``depends``
2067-
is complete. The reference is guaranteed to be held for the whole span
2068-
in between, so the objects cannot be collected while offloaded tasks are
2069-
still reading them.
2070-
2071-
This function is not bound to a queue: the gating events fully determine
2072-
when the objects may be released.
2068+
is complete.
20732069
20742070
:Example:
20752071
.. code-block:: python

dpctl/apis/include/dpctl4pybind11.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,9 @@ sycl::event keep_args_alive(sycl::queue &q,
803803
const py::object (&py_objs)[num],
804804
const std::vector<sycl::event> &depends = {})
805805
{
806+
// q is only retained for API compatibility
807+
(void)q;
808+
806809
std::size_t n_objects_held = 0;
807810
std::array<std::shared_ptr<py::handle>, num> shp_arr{};
808811

dpctl/utils/_order_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __del__(self):
2323
return
2424
_local = self._state
2525
SyclEvent.wait_for(_local.get_submitted_events())
26+
# TODO: remove once deprecated add_event_pair is removed
2627
SyclEvent.wait_for(_local.get_host_task_events())
2728

2829
def add_event_pair(self, host_task_ev, comp_ev):

0 commit comments

Comments
 (0)