Skip to content

Commit d98e3dd

Browse files
authored
[torch] Fix incorrect Concat when processing dynamic paddings (#2540)
See issue #2539 for a better explanation. I know crazy stuff right =^).
1 parent fc792e4 commit d98e3dd

File tree

1 file changed

+1
-1
lines changed
  • onnxscript/function_libs/torch_lib/ops

1 file changed

+1
-1
lines changed

onnxscript/function_libs/torch_lib/ops/nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ def _process_padding(padding: Sequence[INT64 | int], rank: int) -> INT64:
15031503
paddings = [*paddings, *zeros]
15041504
# Interleave the padding values
15051505
paddings = paddings[-2::-2] + paddings[-1::-2]
1506-
return op.Concat(paddings, axis=0)
1506+
return op.Concat(*paddings, axis=0)
15071507

15081508

15091509
@torch_op("aten::pad", trace_only=True)

0 commit comments

Comments
 (0)