legate.core.task.PyTask.prepare_call#
- PyTask.prepare_call(self, *args: Any, **kwargs: Any) AutoTask #
Prepare a task instance for execution.
- Parameters:
*args (Any, optional) – The positional arguments to the task.
**kwargs (Any, optional) – The keyword arguments to the task.
- Returns:
The configured task instance.
- Return type:
AutoTask
- Raises:
RuntimeError – If the task has not completed registration before calling this method.
TypeError – If the type of an argument does not match the expected type of the corresponding argument to the task.
ValueError – If multiple arguments are given for a single argument. This may occur, for example, when a keyword argument overlaps with a positional argument.
Notes
It is the user’s responsibility to invoke the returned task instance, either through task.execute() or get_legate_runtime().submit(task).
The user is not allowed to add any additional inputs, outputs, scalars or reductions to task after this routine returns.
See also
legate.task.task.PyTask.__call__