Skip to content

Commit ab89d2b

Browse files
authored
Correct the output_shape dimension for add_slice
1 parent 8de6c9d commit ab89d2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/torch_tensorrt/fx/converters/operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ def add_slice(network, target, kwargs, name):
12081208
stride = [1] * len(start)
12091209
stride[dim] = step_int
12101210
output_shape = list(input_val.shape)
1211-
output_shape[dim] = math.ceil((stop_int - start_int) // step_int)
1211+
output_shape[dim] = math.ceil((stop_int - start_int) / step_int)
12121212

12131213
if dynamic_shape > 0:
12141214
output_shape = get_shape_with_dynamic_shape(

0 commit comments

Comments
 (0)