legate.core.task.task#
- legate.core.task.task(
- func: UserFunction | None = None,
- *,
- VariantList variants: VariantList = DEFAULT_VARIANT_LIST,
- constraints: Sequence[ConstraintProxy] | None = None,
- bool throws_exception: bool = False,
- bool has_side_effect: bool = False,
- bool register: bool = True,
Convert a Python function to a Legate task.
- Parameters:
func (UserFunction) – The base user function to invoke in the task.
variants (VariantList, optional) – The list of variants for which
func
is applicable. Defaults to(<VariantCode.CPU: 1>,)
.constraints (Sequence[ConstraintProxy], optional) – The list of constraints which are to be applied to the arguments of
func
, if any. Defaults to no constraints.throws_exception (bool, False) – True if any variants of
func
throws an exception, False otherwise.has_side_effect (bool, False) – Whether the task has any global side-effects. See
AutoTask.set_side_ effect()
for further information.register (bool, True) – Whether to immediately complete registration of the task.
- Returns:
task – The task object.
- Return type:
See also
legate.core.task.task.PyTask.__init__