Skip to content

Commit 8694038

Browse files
committed
refactor: Apply linting
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 8b1221b commit 8694038

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

core/conversion/conversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ bool VerifyConverterSupportForBlock(const torch::jit::Block* b, bool suppress_er
539539
auto loc = unsupported_node_locations.find(x.second);
540540
if (loc == unsupported_node_locations.end()) {
541541
unsupported_node_locations.insert({x.second, {torch_tensorrt::core::util::GetPyTorchSourceCode(n)}});
542-
} else {
542+
} else {
543543
loc->second.insert(torch_tensorrt::core::util::GetPyTorchSourceCode(n));
544544
}
545545
}

core/lowering/register_trt_placeholder_ops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RegisterOperators trt_placeholder_ops_reg({
1212
/// to a TRT constant Tensor
1313
Operator(
1414
"trt::const(Tensor val) -> Tensor",
15-
[](Stack& stack) {/*noop*/},
15+
[](Stack& stack) { /*noop*/ },
1616
aliasAnalysisFromSchema()),
1717
});
1818

cpp/include/torch_tensorrt/torch_tensorrt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ enum class EngineCapability : int8_t {
262262
kDLA_STANDALONE,
263263
};
264264

265-
266265
/**
267266
* @brief TensorFormat is an enum class which defines the memeory layout used to store Tensor Data
268267
* */

py/setup.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,19 @@ def run(self):
182182
class CleanCommand(Command):
183183
"""Custom clean command to tidy up the project root."""
184184
PY_CLEAN_DIRS = [
185-
'./build', './dist', './torch_tensorrt/__pycache__', './torch_tensorrt/lib', './torch_tensorrt/include',
186-
'./torch_tensorrt/bin', './*.pyc', './*.tgz', './*.egg-info',
185+
'./build',
186+
'./dist',
187+
'./torch_tensorrt/__pycache__',
188+
'./torch_tensorrt/lib',
189+
'./torch_tensorrt/include',
190+
'./torch_tensorrt/bin',
191+
'./*.pyc',
192+
'./*.tgz',
193+
'./*.egg-info',
187194
]
188195
PY_CLEAN_FILES = [
189-
'./torch_tensorrt/*.so', './torch_tensorrt/_version.py',
190-
'./torch_tensorrt/BUILD', './torch_tensorrt/WORKSPACE', './torch_tensorrt/LICENSE'
196+
'./torch_tensorrt/*.so', './torch_tensorrt/_version.py', './torch_tensorrt/BUILD', './torch_tensorrt/WORKSPACE',
197+
'./torch_tensorrt/LICENSE'
191198
]
192199
description = "Command to tidy up the project root"
193200
user_options = []
@@ -220,7 +227,6 @@ def run(self):
220227
os.remove(path)
221228

222229

223-
224230
ext_modules = [
225231
cpp_extension.CUDAExtension(
226232
'torch_tensorrt._C', [
@@ -235,8 +241,7 @@ def run(self):
235241
dir_path + "torch_tensorrt/csrc", dir_path + "torch_tensorrt/include",
236242
dir_path + "/../bazel-TRTorch/external/tensorrt/include",
237243
dir_path + "/../bazel-Torch-TensorRT-Preview/external/tensorrt/include",
238-
dir_path + "/../bazel-Torch-TensorRT/external/tensorrt/include",
239-
dir_path + "/../"
244+
dir_path + "/../bazel-Torch-TensorRT/external/tensorrt/include", dir_path + "/../"
240245
],
241246
extra_compile_args=[
242247
"-Wno-deprecated",

py/torch_tensorrt/_compile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from torch import fx
77
from enum import Enum
88

9+
910
class _IRType(Enum):
1011
"""Enum to set the minimum required logging level to print a message to stdout
1112
"""

tests/core/lowering/test_conv1d_pass.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ TEST(LoweringPasses, Conv1dCorrectly) {
3535
%12 : Tensor = aten::_convolution(%0, %1, %2, %stride, %padding, %dilation, %3, %output_padding, %6, %3, %3, %3, %3)
3636
return (%12))IR";
3737

38-
torch_tensorrt::core::util::logging::get_logger().set_reportable_log_level(torch_tensorrt::core::util::logging::LogLevel::kGRAPH);
38+
torch_tensorrt::core::util::logging::get_logger().set_reportable_log_level(
39+
torch_tensorrt::core::util::logging::LogLevel::kGRAPH);
3940
auto sg = std::make_shared<torch::jit::Graph>();
4041
torch::jit::parseIR(source_graph, &*sg);
4142
torch_tensorrt::core::lowering::passes::Conv1DToConvolution(sg);
@@ -92,7 +93,8 @@ TEST(LoweringPasses, ConvTransposed1dCorrectly) {
9293
%12 : Tensor = aten::_convolution(%0, %1, %2, %stride, %padding, %dilation, %8, %output_padding, %5, %7, %7, %7, %7)
9394
return (%12))IR";
9495

95-
torch_tensorrt::core::util::logging::get_logger().set_reportable_log_level(torch_tensorrt::core::util::logging::LogLevel::kGRAPH);
96+
torch_tensorrt::core::util::logging::get_logger().set_reportable_log_level(
97+
torch_tensorrt::core::util::logging::LogLevel::kGRAPH);
9698
auto sg = std::make_shared<torch::jit::Graph>();
9799
torch::jit::parseIR(source_graph, &*sg);
98100
torch_tensorrt::core::lowering::passes::ConvTransposed1DToConvolution(sg);

0 commit comments

Comments
 (0)