legate.core.task.PyTask.gpu_variant#

PyTask.gpu_variant(self, func: UserFunction) void#

Register a GPU variant for this task

Parameters:

func (UserFunction) – The new GPU variant function to call for all GPU executions.

Raises:

RuntimeError – If the task has already completed registration.

Notes

Calling this method on a task with an existing GPU variant replaces the old variant with func. Therefore, this method may be used to update variants as well as add new ones.