Skip to content

Commit e6c5545

Browse files
committed
removing assertion
1 parent 889e294 commit e6c5545

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

py/torch_tensorrt/dynamo/lowering/_decompositions.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,6 @@ def select_scatter_decomposition(
171171
dim: int,
172172
index: int,
173173
) -> torch.Tensor:
174-
# input_tensor.shape[dim] = torch.le(index, input_tensor.shape[dim])
175-
# check if the dim is less than shape
176-
if input_tensor.shape[dim] < index:
177-
raise AssertionError("The index should not be greater than dim")
178-
179-
# expanding the src_tensor to have the same dimension as input_tensor
180-
# check if the dimension of the src tensor is same as slice tensor
181-
select_tensor = torch.select(input_tensor, dim, index)
182-
183-
if select_tensor.shape != src_tensor.shape:
184-
raise AssertionError(
185-
"The slice tensor shape should be equal to the src tensor shape"
186-
)
187-
188174
unbind_tensors = torch.unbind(input_tensor, dim)
189175
unbind_tensors_list = list(unbind_tensors)
190176
unbind_tensors_list[index] = src_tensor

0 commit comments

Comments
 (0)