Skip to content

Commit 2addf5e

Browse files
committed
chore: Linter fixes
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 13caff0 commit 2addf5e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

py/torch_tensorrt/_Input.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,7 @@ def example_tensor(self, optimization_profile_field: str = None) -> torch.Tensor
384384
)
385385

386386
if self.shape_mode == Input._ShapeMode.STATIC:
387-
return torch.rand(self.shape).to(
388-
dtype=self.torch_dtype
389-
)
387+
return torch.rand(self.shape).to(dtype=self.torch_dtype)
390388
else:
391389
return torch.rand(self.shape[optimization_profile_field]).to(
392390
dtype=self.torch_dtype

py/torch_tensorrt/dynamo/fx_ts_compat/test/core/test_input_tensor_spec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def test_from_static_input(self):
7272
self._validate_spec(spec, tensor)
7373

7474
def test_from_dynamic_input(self):
75-
inputs = torch_tensorrt.Input(min_shape=(2, 2, 3), opt_shape=(4, 2, 3), max_shape=(8, 2, 3))
75+
inputs = torch_tensorrt.Input(
76+
min_shape=(2, 2, 3), opt_shape=(4, 2, 3), max_shape=(8, 2, 3)
77+
)
7678
example_tensor = inputs.example_tensor(optimization_profile_field="opt_shape")
7779
spec = InputTensorSpec.from_input(inputs)
7880
self._validate_spec(spec, example_tensor, dynamic_dims=[0])

0 commit comments

Comments
 (0)