Skip to content

Commit 0d7ca6f

Browse files
authored
fix: Adjust reflection pad test cases to prevent runtime errors (#3088)
1 parent eb9f37f commit 0d7ca6f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

py/torch_tensorrt/dynamo/conversion/impl/pad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_padded_shape_tensors(
7979
).get_output(0)
8080
)
8181
padded_shape_tensor = impl.cat.cat(
82-
ctx, target, source_ir, f"{name}_cat", slices, 0
82+
ctx, target, source_ir, f"{name}_cat_dim_{i}", slices, 0
8383
)
8484

8585
start_indices_tensor = get_trt_tensor(

tests/py/dynamo/conversion/test_pad_aten.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def forward(self, input):
146146
[
147147
(
148148
"4d",
149-
(1, 1, 1, 1),
150149
(2, 2, 2, 2),
151-
(3, 3, 3, 3),
150+
(4, 4, 4, 4),
151+
(6, 6, 6, 6),
152152
torch.float,
153153
(1, 1, 2, 2),
154154
),
@@ -199,9 +199,9 @@ def forward(self, input):
199199
[
200200
(
201201
"5d",
202-
(1, 1, 1, 1, 1),
203202
(2, 2, 2, 2, 2),
204-
(3, 3, 3, 3, 3),
203+
(4, 4, 4, 4, 4),
204+
(6, 6, 6, 6, 6),
205205
torch.float,
206206
(1, 2, 2, 1, 1, 2),
207207
),

0 commit comments

Comments
 (0)