Skip to content

Add parsec_taskpool_trim_chores() to strip incarnations by name - #808

Draft
bosilca wants to merge 1 commit into
ICLDisco:masterfrom
bosilca:topic/taskpool-trim-chores
Draft

bosilca wants to merge 1 commit into
ICLDisco:masterfrom
bosilca:topic/taskpool-trim-chores

Conversation

@bosilca

@bosilca bosilca commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Lets a caller drop incarnations from a taskpool by device type or by body name, so a DSL can decide at runtime that a kernel is not to be used. Adds tests/api/trim_chores for coverage.

Draft: another API is still to be added here.

Stacked on #811, whose single commit shows up here until it merges.

A task class that declares bodies for several device types leaves the choice
of device to the runtime, and a caller had no way to narrow it. The PTG
compiler had the same need for the device types a build does not support, and
open-coded its own compaction of the incarnation arrays to get it.

parsec_taskpool_trim_chores() takes a specification such as
"potrf:cuda;trsm:cuda,hip", where "*" stands for every task class and "gpu"
for every accelerator type, and removes those incarnations before anything
looks at them. The result is a taskpool that reads like one whose tasks never
declared those bodies, instead of one that offers them and turns them down a
task at a time. A task class named by the specification but absent from the
taskpool is reported and not an error, so one specification can be handed to
several taskpools; emptying a task class is refused, as it would leave tasks
that can never run.

parsec_taskpool_drop_chores() does the removal from a device type mask and is
what jdf2c now emits in place of its loop. It is backed by
parsec_device_type_from_name(), which maps a device type name to its mask, and
parsec_task_class_device_types(), which reports the types a task class has an
incarnation for.
@bosilca
bosilca force-pushed the topic/taskpool-trim-chores branch from 2b06a53 to 32839b2 Compare September 28, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant