Skip to content

Commit 88659a1

Browse files
committed
correcting the validator error message
1 parent b7f2dee commit 88659a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,17 @@ def aten_ops_native_group_norm(
218218

219219

220220
def cat_validator(node: Node, settings: Optional[CompilationSettings] = None) -> bool:
221-
# Validate only one user, which is a getitem node that accesses the first element in the list
221+
# empty tensor in cat input as ITensor leads to [RemoveDeadLayers] Input Tensor y is unused or used only at compile-time, but is not being removed.
222222
for each_input in node.args[0]:
223223
if isinstance(each_input, TRTTensor) and any(s == 0 for s in each_input.shape):
224224
return False
225225
return True
226226

227227

228228
@dynamo_tensorrt_converter(
229-
torch.ops.aten.cat.default, supports_dynamic_shapes=True, validator=cat_validator
229+
torch.ops.aten.cat.default,
230+
capability_validator=cat_validator,
231+
supports_dynamic_shapes=True,
230232
)
231233
def aten_ops_cat(
232234
ctx: ConversionContext,

0 commit comments

Comments
 (0)