Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion legate/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def __del__(self) -> None:
def add_scalar_arg(
self,
value: Any,
dtype: DTType,
dtype: Union[DTType, tuple[DTType]],
untyped: bool = True,
) -> None:
self._scalars.append(
Expand Down
8 changes: 5 additions & 3 deletions legate/core/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def all_unknowns(self) -> list[PartSym]:

class TaskProtocol(OperationProtocol, Protocol):
_task_id: int
_scalar_args: list[tuple[Any, DTType]]
_scalar_args: list[tuple[Any, Union[DTType, tuple[DTType]]]]
_comm_args: list[Communicator]


Expand Down Expand Up @@ -225,7 +225,7 @@ def __init__(
) -> None:
super().__init__(**kwargs)
self._task_id = task_id
self._scalar_args: list[tuple[Any, DTType]] = []
self._scalar_args: list[tuple[Any, Union[DTType, tuple[DTType]]]] = []
self._comm_args: list[Communicator] = []
self._exn_types: list[type] = []
self._tb: Union[None, TracebackType] = None
Expand All @@ -238,7 +238,9 @@ def get_name(self) -> str:
libname = self.context.library.get_name()
return f"{libname}.Task(tid:{self._task_id}, uid:{self._op_id})"

def add_scalar_arg(self, value: Any, dtype: DTType) -> None:
def add_scalar_arg(
self, value: Any, dtype: Union[DTType, tuple[DTType]]
) -> None:
self._scalar_args.append((value, dtype))

def add_dtype_arg(self, dtype: DTType) -> None:
Expand Down