-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect GPU tasks by inspecting inputs/outputs #4656
Comments
I think @ayushdg has been exploring using annotations for heterogeneous cluster use cases. So he may have thoughts on that approach as well 🙂 |
I think only using task results is going to cause problems. One of the things we see our users somewhat commonly do is self-contain all of their GPU work within a task where neither the inputs or outputs of the task are GPU objects. |
Hrm, good point. Maybe there is a holistic "try many different things" mix of approaches that we use to cover this space. |
Regardless, we should probably think about annotating tasks with a |
It would be useful to automagically detect which tasks engaged the GPU. This would allow us to more easily use both the CPU and GPU in mixed workloads, and require less configuration by the user. Unfortunately automatically detecting GPU tasks is hard.
There are a few approaches to this:
b"cudf"
orb"torch"
. This was surprisingly effective, but also cludgy as heck.__cuda_array_interface__
and send that information back to the schedulerSo, the new idea again would be that whenever a task created a result that engaged the
__cuda_array_interface__
protocol we would include that information as we sent it up to the scheduler. Probably this requires a new attribute likecuda_nbytes
on theTaskState
(which I'm personally fine with). The scheduler would watch for this signal, and if it occurred it would probably flip acuda
flag on theTaskPrefix
, which would then trigger a signal that got sent down to all of the workers, and maybe pushed that task to run in a different ThreadPoolExecutor (see #4655 )This would mis-allocate the first few tasks to the CPU Executor, but mostly it would do the right thing, and wouldn't require any intervention from the user
cc @dask/gpu
The text was updated successfully, but these errors were encountered: