Skip to content

Commit 5d7be33

Browse files
Fixed linter errors.
1 parent 3f670a2 commit 5d7be33

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

extension/module/module.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ runtime::Error Module::load_method(
134134

135135
if (!planned_memory) {
136136
const auto method_metadata =
137-
ET_UNWRAP(program_->method_meta(method_name.c_str()));
137+
ET_UNWRAP(program_->method_meta(method_name.c_str()));
138138
const auto planned_buffers_count =
139139
method_metadata.num_memory_planned_buffers();
140140
method_holder.planned_buffers.reserve(planned_buffers_count);
@@ -148,16 +148,13 @@ runtime::Error Module::load_method(
148148
method_holder.planned_buffers.back().data(), buffer_size);
149149
}
150150
method_holder.planned_memory =
151-
std::make_unique<runtime::HierarchicalAllocator>(
152-
runtime::Span(
153-
method_holder.planned_spans.data(),
154-
method_holder.planned_spans.size()));
151+
std::make_unique<runtime::HierarchicalAllocator>(runtime::Span(
152+
method_holder.planned_spans.data(),
153+
method_holder.planned_spans.size()));
155154
planned_memory = method_holder.planned_memory.get();
156155
}
157156
method_holder.memory_manager = std::make_unique<runtime::MemoryManager>(
158-
memory_allocator_.get(),
159-
planned_memory,
160-
temp_allocator_.get());
157+
memory_allocator_.get(), planned_memory, temp_allocator_.get());
161158
method_holder.method = ET_UNWRAP_UNIQUE(program_->load_method(
162159
method_name.c_str(),
163160
method_holder.memory_manager.get(),

extension/module/module.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ class Module {
148148
runtime::HierarchicalAllocator* planned_memory = nullptr,
149149
torch::executor::EventTracer* event_tracer = nullptr);
150150

151-
ET_DEPRECATED ET_NODISCARD
152-
runtime::Error inline load_method(
153-
const std::string& method_name,
154-
torch::executor::EventTracer* event_tracer) {
151+
ET_DEPRECATED ET_NODISCARD runtime::Error inline load_method(
152+
const std::string& method_name,
153+
torch::executor::EventTracer* event_tracer) {
155154
return load_method(method_name, nullptr, event_tracer);
156155
}
157156

0 commit comments

Comments
 (0)