Skip to content

Commit 9a72f4c

Browse files
committed
Fixed comments
1 parent 164b934 commit 9a72f4c

File tree

4 files changed

+273
-274
lines changed

4 files changed

+273
-274
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ def compile(
243243
elif target_ir == _IRType.dynamo:
244244
# Prepare torch and torchtrt inputs
245245
if not arg_inputs and not inputs:
246-
raise AssertionError("'arg_input' and 'input' should not both be None.")
246+
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")
247247

248248
elif arg_inputs and inputs:
249249
raise AssertionError(
250-
"'arg_input' and 'input' should not be used at the same time."
250+
"'arg_inputs' and 'inputs' should not be used at the same time."
251251
)
252252
arg_inputs = inputs or arg_inputs
253253

@@ -367,11 +367,11 @@ def convert_method_to_trt_engine(
367367
elif target_ir == _IRType.dynamo:
368368
# Prepare torch and torchtrt inputs
369369
if not arg_inputs and not inputs:
370-
raise AssertionError("'arg_input' and 'input' should not both be None.")
370+
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")
371371

372372
elif arg_inputs and inputs:
373373
raise AssertionError(
374-
"'arg_input' and 'input' should not be used at the same time."
374+
"'arg_inputs' and 'inputs' should not be used at the same time."
375375
)
376376
arg_inputs = arg_inputs or inputs
377377

@@ -475,7 +475,7 @@ def save(
475475
)
476476
if arg_inputs and inputs:
477477
raise AssertionError(
478-
"'arg_input' and 'input' should not be used at the same time."
478+
"'arg_inputs' and 'inputs' should not be used at the same time."
479479
)
480480

481481
arg_inputs = inputs or arg_inputs

py/torch_tensorrt/dynamo/_compiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ def compile(
187187

188188
# Aliasing inputs to arg_inputs for better understanding
189189
if not arg_inputs and not inputs:
190-
raise AssertionError("'arg_input' and 'input' should not both be None.")
190+
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")
191191

192192
elif arg_inputs and inputs:
193193
raise AssertionError(
194-
"'arg_input' and 'input' should not be used at the same time."
194+
"'arg_inputs' and 'inputs' should not be used at the same time."
195195
)
196196

197197
arg_inputs = inputs or arg_inputs
@@ -609,11 +609,11 @@ def convert_module_to_trt_engine(
609609
stacklevel=2,
610610
)
611611
if not arg_inputs and not inputs:
612-
raise AssertionError("'arg_input' and 'input' should not both be None.")
612+
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")
613613

614614
elif arg_inputs and inputs:
615615
raise AssertionError(
616-
"'arg_input' and 'input' should not be used at the same time."
616+
"'arg_inputs' and 'inputs' should not be used at the same time."
617617
)
618618

619619
arg_inputs = inputs or arg_inputs

py/torch_tensorrt/dynamo/_tracer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def trace(
5959

6060
# Set log level at the top of compilation (torch_tensorrt.dynamo)
6161
if not arg_inputs and not inputs:
62-
raise AssertionError("'arg_input' and 'input' should not both be None.")
62+
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")
6363

6464
elif arg_inputs and inputs:
6565
raise AssertionError(
66-
"'arg_input' and 'input' should not be used at the same time."
66+
"'arg_inputs' and 'inputs' should not be used at the same time."
6767
)
6868
arg_inputs = inputs or arg_inputs
6969

@@ -79,7 +79,6 @@ def trace(
7979
torch_kwarg_inputs = get_torch_inputs(kwarg_inputs, device)
8080
dynamic_shapes = get_dynamic_shapes_args(mod, arg_inputs)
8181
dynamic_shapes.update(get_dynamic_shapes_kwargs(kwarg_inputs))
82-
# breakpoint()
8382
exp_program = export(
8483
mod,
8584
tuple(torch_arg_inputs),

0 commit comments

Comments
 (0)