Skip to content

Conversion mismatch for aten::unbind.int #2533

@linshokaku

Description

@linshokaku

@torch_op("aten::unbind.int")
def aten_unbind(self: TTensor, dim: int = 0) -> Sequence[TTensor]:
"""unbind.int(Tensor(a -> *) self, int dim=0) -> Tensor(a)[]"""
split_sizes = op.Constant(value_int=1)
return op.SplitToSequence(self, split_sizes, axis=dim, keepdims=False)

When split args are specified, SplitToSequence disables keepdims, resulting in tensor sequences with shapes that differ from those output by aten::unbind.int.

cf. https://onnx.ai/onnx/operators/onnx__SplitToSequence.html#attributes

Metadata

Metadata

Assignees

Labels

contribution welcomeWe welcome code contributions for thisgood first issueGood for newcomersmodule: torchlibRelated to the torch/aten function lib in development

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions