Skip to content

Commit d36a280

Browse files
committed
add sym_storage_offset
1 parent 1dd9d04 commit d36a280

File tree

1 file changed

+8
-0
lines changed
  • onnxscript/function_libs/torch_lib/ops

1 file changed

+8
-0
lines changed

onnxscript/function_libs/torch_lib/ops/core.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8750,6 +8750,14 @@ def aten_sym_size(self: TensorType, dim: int = 0) -> INT64:
87508750
return op.Squeeze(op.Shape(self, end=dim + 1, start=dim))
87518751

87528752

8753+
@torch_op("aten::sym_storage_offset", trace_only=True)
8754+
def aten_sym_storage_offset(self: TensorType, dim: int = 0) -> INT64:
8755+
"""sym_storage_offset(Tensor self, int dim) -> SymInt"""
8756+
# storage offset is not used in onnx world.
8757+
# the output of this function is not used.
8758+
return op.Constant(value_int=0)
8759+
8760+
87538761
def aten_symeig(
87548762
self: TensorType, eigenvectors: bool = False, upper: bool = True
87558763
) -> tuple[TensorType, TensorType]:

0 commit comments

Comments
 (0)