Skip to content

Commit 49d367d

Browse files
committed
refactor: apply linting
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 1c3c779 commit 49d367d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

core/runtime/TRTEngine.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ TRTEngine::TRTEngine(std::string mod_name, std::string serialized_engine, CudaDe
6363
auto delim = bind_name.find(".");
6464
if (delim == std::string::npos) {
6565
delim = bind_name.find("_");
66-
TORCHTRT_CHECK(delim != std::string::npos, "Unable to determine binding index for input " << bind_name << "\nEnsure module was compile with Torch-TensorRT.ts");
66+
TORCHTRT_CHECK(
67+
delim != std::string::npos,
68+
"Unable to determine binding index for input " << bind_name
69+
<< "\nEnsure module was compile with Torch-TensorRT.ts");
6770
}
6871

6972
std::string idx_s = bind_name.substr(delim + 1);
@@ -97,16 +100,16 @@ std::string TRTEngine::to_str() const {
97100
ss << " Name: " << name << std::endl;
98101
ss << " Inputs: [" << std::endl;
99102
for (uint64_t i = 0; i < num_io.first; i++) {
100-
ss << " id: " << i << std::endl;
101-
ss << " shape: " << exec_ctx->getBindingDimensions(i) << std::endl;
102-
ss << " dtype: " << util::TRTDataTypeToScalarType(exec_ctx->getEngine().getBindingDataType(i)) << std::endl;
103+
ss << " id: " << i << std::endl;
104+
ss << " shape: " << exec_ctx->getBindingDimensions(i) << std::endl;
105+
ss << " dtype: " << util::TRTDataTypeToScalarType(exec_ctx->getEngine().getBindingDataType(i)) << std::endl;
103106
}
104107
ss << " ]" << std::endl;
105108
ss << " Outputs: [" << std::endl;
106109
for (uint64_t o = 0; o < num_io.second; o++) {
107-
ss << " id: " << o << std::endl;
108-
ss << " shape: " << exec_ctx->getBindingDimensions(o) << std::endl;
109-
ss << " dtype: " << util::TRTDataTypeToScalarType(exec_ctx->getEngine().getBindingDataType(o)) << std::endl;
110+
ss << " id: " << o << std::endl;
111+
ss << " shape: " << exec_ctx->getBindingDimensions(o) << std::endl;
112+
ss << " dtype: " << util::TRTDataTypeToScalarType(exec_ctx->getEngine().getBindingDataType(o)) << std::endl;
110113
}
111114
ss << " ]" << std::endl;
112115
ss << " Device: " << device_info << std::endl;

tests/util/run_graph_engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ std::vector<core::ir::Input> toInputs(std::vector<at::Tensor> ten) {
2121
for (auto i : ten) {
2222
a.push_back(core::ir::Input(core::util::toVec(i.sizes())));
2323
}
24-
return std::move(a);
24+
return a;
2525
}
2626

2727
std::vector<core::ir::Input> toInputsDynamic(std::vector<at::Tensor> ten, bool dynamic_batch) {
@@ -49,7 +49,7 @@ std::vector<core::ir::Input> toInputsDynamic(std::vector<at::Tensor> ten, bool d
4949
}
5050
}
5151

52-
return std::move(a);
52+
return a;
5353
}
5454

5555
std::vector<at::Tensor> RunEngine(std::string& eng, std::vector<at::Tensor> inputs) {

0 commit comments

Comments
 (0)