Skip to content

Commit 0815680

Browse files
committed
refactor: Lint code
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 57c6d46 commit 0815680

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

core/lowering/passes/remove_bn_dim_check.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ struct BNDimCheckRemoval {
5050

5151
auto arm1_start = arm1->nodes().begin();
5252

53-
if ((*arm1_start)->kind() != c10::Symbol::fromQualString("aten::format") && (*(++arm1_start))->kind() != prim::RaiseException && (*(++arm1_start))->kind() != prim::Return) {
53+
if ((*arm1_start)->kind() != c10::Symbol::fromQualString("aten::format") &&
54+
(*(++arm1_start))->kind() != prim::RaiseException && (*(++arm1_start))->kind() != prim::Return) {
5455
// Make sure that block0 is solely just the exception and the return
5556
return false;
5657
}

py/trtorch/csrc/register_tensorrt_classes.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,26 @@ namespace {
1010

1111
void RegisterTRTCompileSpec() {
1212
static auto TRTORCH_UNUSED TRTInputRangeTSRegistration =
13-
torch::class_<trtorch::pyapi::InputRange>("tensorrt", "InputRange").def(torch::init<>());
13+
torch::class_<trtorch::pyapi::InputRange>("tensorrt", "InputRange").def(torch::init<>());
1414

1515
ADD_FIELD_GET_SET_REGISTRATION(TRTInputRangeTSRegistration, trtorch::pyapi::InputRange, min);
1616
ADD_FIELD_GET_SET_REGISTRATION(TRTInputRangeTSRegistration, trtorch::pyapi::InputRange, opt);
1717
ADD_FIELD_GET_SET_REGISTRATION(TRTInputRangeTSRegistration, trtorch::pyapi::InputRange, max);
1818

1919
static auto TRTORCH_UNUSED TRTDeviceTSRegistration =
20-
torch::class_<trtorch::pyapi::Device>("tensorrt", "Device").def(torch::init<>());
20+
torch::class_<trtorch::pyapi::Device>("tensorrt", "Device").def(torch::init<>());
2121

2222
ADD_FIELD_GET_SET_REGISTRATION(TRTDeviceTSRegistration, trtorch::pyapi::Device, device_type);
2323
ADD_FIELD_GET_SET_REGISTRATION(TRTDeviceTSRegistration, trtorch::pyapi::Device, gpu_id);
2424
ADD_FIELD_GET_SET_REGISTRATION(TRTDeviceTSRegistration, trtorch::pyapi::Device, dla_core);
2525
ADD_FIELD_GET_SET_REGISTRATION(TRTDeviceTSRegistration, trtorch::pyapi::Device, allow_gpu_fallback);
2626

27-
2827
static auto TRTORCH_UNUSED TRTCompileSpecTSRegistration =
29-
torch::class_<trtorch::pyapi::CompileSpec>("tensorrt", "CompileSpec")
30-
.def(torch::init<>())
31-
.def("append_input_range", &trtorch::pyapi::CompileSpec::appendInputRange)
32-
.def("set_device", &trtorch::pyapi::CompileSpec::setDeviceIntrusive)
33-
.def("__str__", &trtorch::pyapi::CompileSpec::stringify);
28+
torch::class_<trtorch::pyapi::CompileSpec>("tensorrt", "CompileSpec")
29+
.def(torch::init<>())
30+
.def("append_input_range", &trtorch::pyapi::CompileSpec::appendInputRange)
31+
.def("set_device", &trtorch::pyapi::CompileSpec::setDeviceIntrusive)
32+
.def("__str__", &trtorch::pyapi::CompileSpec::stringify);
3433

3534
ADD_FIELD_GET_SET_REGISTRATION(TRTCompileSpecTSRegistration, trtorch::pyapi::CompileSpec, op_precision);
3635
ADD_FIELD_GET_SET_REGISTRATION(TRTCompileSpecTSRegistration, trtorch::pyapi::CompileSpec, refit);
@@ -41,7 +40,6 @@ void RegisterTRTCompileSpec() {
4140
ADD_FIELD_GET_SET_REGISTRATION(TRTCompileSpecTSRegistration, trtorch::pyapi::CompileSpec, num_avg_timing_iters);
4241
ADD_FIELD_GET_SET_REGISTRATION(TRTCompileSpecTSRegistration, trtorch::pyapi::CompileSpec, workspace_size);
4342
ADD_FIELD_GET_SET_REGISTRATION(TRTCompileSpecTSRegistration, trtorch::pyapi::CompileSpec, max_batch_size);
44-
4543
}
4644

4745
struct TRTTSRegistrations {

0 commit comments

Comments
 (0)