Skip to content

Commit 2af7935

Browse files
committed
chore: apply linting
Signed-off-by: Bo Wang <[email protected]>
1 parent 4b61dda commit 2af7935

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

core/compiler.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ void AddIfBlockToGraph(
203203
auto cur_block_mapping = graph_and_mapping.second;
204204
std::unordered_map<torch::jit::Value*, torch::jit::Value*> block_graph_to_new_g;
205205
for (auto& i : cur_block_mapping) {
206-
// for every pair in then_mapping, old_value => mini graph value, if old_value also appears in old_to_new_g, then it's
207-
// mini graph's input
206+
// for every pair in then_mapping, old_value => mini graph value, if old_value also appears in old_to_new_g, then
207+
// it's mini graph's input
208208
if (old_to_new_g.count(i.first)) {
209209
block_graph_to_new_g[i.second] = old_to_new_g[i.first];
210210
}
@@ -317,8 +317,7 @@ torch::jit::script::Module CompileGraphWithFallback(const torch::jit::script::Mo
317317
input_ranges.insert({g->inputs()[i], cfg.convert_info.input_ranges[i]});
318318
}
319319
auto input_ivalues_map = partitioning::generateRandomInputs(input_ranges);
320-
auto graph_and_mapping =
321-
ConstructFallbackGraph(new_mod, g->block(), input_ivalues_map, cfg, named_params);
320+
auto graph_and_mapping = ConstructFallbackGraph(new_mod, g->block(), input_ivalues_map, cfg, named_params);
322321
new_g = graph_and_mapping.first;
323322
LOG_INFO(*new_g << "(FallbackGraph)\n");
324323

core/partitioning/partitioning.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include <queue>
44
#include "core/conversion/conversion.h"
5-
#include "torch/csrc/jit/passes/constant_pooling.h"
65
#include "core/partitioning/shape_analysis.h"
6+
#include "torch/csrc/jit/passes/constant_pooling.h"
77
#include "torch/csrc/jit/passes/dead_code_elimination.h"
88

99
namespace trtorch {
@@ -150,7 +150,8 @@ void resolveNonTensorInputs(PartitionedGraph& segmented_blocks) {
150150
if (!updated_segments.count(first_torch_id)) {
151151
auto to_inject_blocks = injectNodesForNonTensorInputs(segmented_blocks[first_torch_id]);
152152
segmented_blocks.erase(segmented_blocks.begin() + first_torch_id);
153-
segmented_blocks.insert(segmented_blocks.begin() + first_torch_id, to_inject_blocks.begin(), to_inject_blocks.end());
153+
segmented_blocks.insert(
154+
segmented_blocks.begin() + first_torch_id, to_inject_blocks.begin(), to_inject_blocks.end());
154155
updated_segments.insert(first_torch_id);
155156
}
156157
} else {

0 commit comments

Comments
 (0)