Skip to content

Commit 695dc9b

Browse files
committed
chore: address review comments
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 6858c0a commit 695dc9b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

py/torch_tensorrt/_Input.py

-6
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,6 @@ def from_tensors(
391391
for t in ts
392392
]
393393

394-
def set_torch_tensor(self, torch_tensor: torch.Tensor) -> None:
395-
"""
396-
Set the user provided torch tensor for the Input class.
397-
"""
398-
self.torch_tensor = torch_tensor
399-
400394
def example_tensor(
401395
self, optimization_profile_field: Optional[str] = None
402396
) -> torch.Tensor:

py/torch_tensorrt/dynamo/compile.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import collections.abc
43
import logging
54
from typing import Any, List, Optional, Sequence, Set, Tuple, Union
65

@@ -87,9 +86,6 @@ def compile(
8786
"require_full_compilation}"
8887
)
8988

90-
if not isinstance(inputs, collections.abc.Sequence):
91-
inputs = [inputs]
92-
9389
device = to_torch_tensorrt_device(device)
9490

9591
if (

py/torch_tensorrt/dynamo/conversion/truncate_long_and_double.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ def repair_long_or_double_inputs(
216216

217217
# Set the 32bit inputs and their types to the submodule Inputs
218218
for idx in range(len(submodule_inputs)):
219-
submodule_inputs[idx].set_torch_tensor(submodule_torch_inputs[idx])
219+
submodule_inputs[idx].torch_tensor = submodule_torch_inputs[idx]
220220
submodule_inputs[idx].torch_dtype = submodule_torch_inputs[idx].dtype
221-
submodule_inputs[idx].dtype = submodule_torch_inputs[idx].dtype
222221

223222
return submodule_inputs

0 commit comments

Comments
 (0)