Skip to content

Commit 53af800

Browse files
authored
add converter for aten::sym_storage_offset (#2697)
1 parent c1bfdfc commit 53af800

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
@@ -8753,6 +8753,14 @@ def aten_sym_size(self: TensorType, dim: int = 0) -> INT64:
87538753
return op.Squeeze(op.Shape(self, end=dim + 1, start=dim))
87548754

87558755

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

0 commit comments

Comments
 (0)