Skip to content

Commit 5f9f97f

Browse files
committed
Updated slide validations, now it can be bigger than 1. Since the compiler already fills with 1 when the array is empty, we can assume that will be always equals or bigger than 1
1 parent 695f6ec commit 5f9f97f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

torch_ttnn/passes/lowering/to_tt_pass.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def reshape_1d(code, args=args, kwargs=kwargs):
701701
[step] = step or [1]
702702
rank = len(input_size)
703703

704-
if step != 1 or dim >= rank:
704+
if dim >= rank:
705705
return None
706706

707707
# Check if no-op, just return the input tensor
@@ -1152,9 +1152,7 @@ def reshape_1d(code, args=args, kwargs=kwargs):
11521152
# slice_scatter could be concat([pre_slice_tensor, src_tensor, post_slice_tensor])
11531153
rank = len(tensor_shape)
11541154
[step] = step or [1]
1155-
if step != 1:
1156-
return None
1157-
1155+
11581156
assert dim < rank, f"The slice dim {dim} should be less than rank {rank}"
11591157

11601158
dim = (dim + rank) % rank

0 commit comments

Comments
 (0)