Skip to content

Commit 7527995

Browse files
committed
Change arg_inputs back to inputs
1 parent 50ba223 commit 7527995

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,
@@ -195,19 +194,13 @@ def compile(
195194
f"Detected torch_executed_modules was non-empty: {torch_executed_modules}"
196195
"\nThis feature is unimplemented in Torch-TRT Dynamo currently."
197196
)
198-
if inputs is not None:
199-
logger.warning(
200-
"'inputs' is deprecated. Please use 'args_inputs' in the future."
201-
)
202-
if arg_inputs is None:
203-
arg_inputs = inputs
204-
else:
205-
logger.warning(
206-
"Both 'arg_inputs' and 'inputs' are received. 'inputs' will be ignored."
207-
)
208-
else:
209-
if arg_inputs is None:
210-
raise AssertionError("'arg_inputs' cannot be empty")
197+
198+
# Aliasing inputs to arg_inputs for better understanding
199+
arg_inputs = inputs
200+
201+
if kwarg_inputs is None:
202+
kwarg_inputs = {}
203+
211204
if not isinstance(arg_inputs, collections.abc.Sequence):
212205
arg_inputs = [arg_inputs]
213206

0 commit comments

Comments
 (0)