Remove host_task object management - #2359
Open
ndgrigorian wants to merge 1 commit into
Open
ndgrigorian wants to merge 1 commit into
ndgrigorian wants to merge 1 commit into
Conversation
ndgrigorian
requested review from
antonwolfy and
vlad-perevezentsev
as code owners
August 10, 2026 18:16
ndgrigorian
force-pushed
the
feature/drop-host-task-object-management
branch
from
August 10, 2026 18:17
c41755c to
bbf7d44
Compare
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2359/index.html |
Collaborator
antonwolfy
reviewed
Aug 17, 2026
antonwolfy
reviewed
Aug 19, 2026
ndgrigorian
force-pushed
the
feature/drop-host-task-object-management
branch
from
September 6, 2026 07:16
f412bf7 to
637c490
Compare
ndgrigorian
force-pushed
the
feature/drop-host-task-object-management
branch
from
September 14, 2026 21:29
ad6aa9e to
9a6f156
Compare
host_task object management to a thread pool based approachhost_task object management
Removed use of host_task that took the GIL and could free a USM allocation, so the task called sycl::free and destroyed a sycl::context inside the host_task. This is forbidden per the SYCL spec, and made dpctl unbuildable against AdaptiveCpp, which does not implement host_task. The releases are now deferred instead via a polling thread. Deprecates SyclQueue._submit_keep_args_alive in favor of SyclQueue.keep_args_alive, intended as a public method for keeping alive these Python objects in a way free of host_task. Also deprecates methods add_event_pair, num_host_task_events, and host_task_events on the SequentialOrderManager, while adding add_event, add_cleanup_event, and num_cleanup_events. _sycl_queue.pyx also gains an atexit hook to prevent crashes at process teardown.
ndgrigorian
force-pushed
the
feature/drop-host-task-object-management
branch
from
September 17, 2026 22:00
84bf7e3 to
1d6e587
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired by comment in: AdaptiveCpp/AdaptiveCpp#1915
we move away from use of
host_task, which enables compatibility with AdaptiveCpp, and fixes long-standing undefined behavior of callingsycl::freefrom within ahost_task. Thehost_taskdecrementing the refcount would cause theUSMDeleterto be called in its scope, which is undefined behavior under the SYCL specInstead, we use a polling thread which checks for event completion, then decreases references