Skip to content

Commit 604d58c

Browse files
committed
Change arg_inputs back to inputs
1 parent 42ff15e commit 604d58c

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

docs/_downloads/6dc7949e3e7f3cb855e4a7b28eadc851/vgg16_fp8_ptq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def calibrate_loop(model):
229229
exp_program = torch.export.export(model, (input_tensor,))
230230
trt_model = torchtrt.dynamo.compile(
231231
exp_program,
232-
arg_inputs=[input_tensor],
232+
inputs=[input_tensor],
233233
enabled_precisions={torch.float8_e4m3fn},
234234
min_block_size=1,
235235
debug=False,

examples/dynamo/vgg16_fp8_ptq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def calibrate_loop(model):
229229
exp_program = torch.export.export(model, (input_tensor,))
230230
trt_model = torchtrt.dynamo.compile(
231231
exp_program,
232-
arg_inputs=[input_tensor],
232+
inputs=[input_tensor],
233233
enabled_precisions={torch.float8_e4m3fn},
234234
min_block_size=1,
235235
debug=False,

py/torch_tensorrt/dynamo/_compiler.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@
4747

4848
def compile(
4949
exported_program: ExportedProgram,
50+
inputs: Sequence[Any],
5051
*,
51-
arg_inputs: Optional[Sequence[Any]] = None,
52-
inputs: Optional[Sequence[Any]] = None,
5352
kwarg_inputs: Optional[dict[Any, Any]] = None,
5453
device: Optional[Union[Device, torch.device, str]] = _defaults.DEVICE,
5554
disable_tf32: bool = _defaults.DISABLE_TF32,
@@ -181,19 +180,13 @@ def compile(
181180
f"Detected torch_executed_modules was non-empty: {torch_executed_modules}"
182181
"\nThis feature is unimplemented in Torch-TRT Dynamo currently."
183182
)
184-
if inputs is not None:
185-
logger.warning(
186-
"'inputs' is deprecated. Please use 'args_inputs' in the future."
187-
)
188-
if arg_inputs is None:
189-
arg_inputs = inputs
190-
else:
191-
logger.warning(
192-
"Both 'arg_inputs' and 'inputs' are received. 'inputs' will be ignored."
193-
)
194-
else:
195-
if arg_inputs is None:
196-
raise AssertionError("'arg_inputs' cannot be empty")
183+
184+
# Aliasing inputs to arg_inputs for better understanding
185+
arg_inputs = inputs
186+
187+
if kwarg_inputs is None:
188+
kwarg_inputs = {}
189+
197190
if not isinstance(arg_inputs, collections.abc.Sequence):
198191
arg_inputs = [arg_inputs]
199192

0 commit comments

Comments
 (0)