Skip to content

Commit 206061f

Browse files
committed
Correctly create empty ints for Constant in rewriter
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
1 parent 73d6134 commit 206061f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxscript/rewriter/ort_fusions/shape_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def rewrite(self, op, dim0, dim1, dim2, dim3, **_):
5555
transposed_dims = [dim0, dim2, dim1, dim3]
5656
sliced_result = transposed_dims[self._start_val : self._end_val]
5757
if len(sliced_result) == 0:
58-
return op.Constant(value_ints=[])
58+
return op.Constant(value_ints=ir.AttrInt64s("value_ints", []))
5959
if len(sliced_result) == 1:
6060
return op.Identity(sliced_result[0])
6161
return op.Concat(*sliced_result, axis=0)

0 commit comments

Comments
 (0)