Skip to content

Commit b1f4942

Browse files
authored
[torchlib] Fix zeros_like signature (#1790)
Include the missing arguments
1 parent cf5ddd9 commit b1f4942

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • onnxscript/function_libs/torch_lib/ops

onnxscript/function_libs/torch_lib/ops/core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8960,7 +8960,14 @@ def aten_zeros(
89608960

89618961

89628962
@torch_op("aten::zeros_like", trace_only=True)
8963-
def aten_zeros_like(self: TTensor, dtype: int = -1) -> TTensor:
8963+
def aten_zeros_like(
8964+
self: TTensor,
8965+
dtype: int = -1,
8966+
layout: str = "",
8967+
device: str = "",
8968+
pin_memory: bool = False,
8969+
memory_format: str = "",
8970+
) -> TTensor:
89648971
"""zeros_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor"""
89658972

89668973
# NOTE: trace_only because both if branches need to be the same type, but we have

0 commit comments

Comments
 (0)