Skip to content

Commit b55c86f

Browse files
Fixed linter errors.
1 parent 3e88cc2 commit b55c86f

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
@@ -187,7 +187,7 @@ runtime::Error Module::load_method(
187187

188188
if (!planned_memory) {
189189
const auto method_metadata =
190-
ET_UNWRAP(program_->method_meta(method_name.c_str()));
190+
ET_UNWRAP(program_->method_meta(method_name.c_str()));
191191
const auto planned_buffers_count =
192192
method_metadata.num_memory_planned_buffers();
193193
method_holder.planned_buffers.reserve(planned_buffers_count);
@@ -201,16 +201,13 @@ runtime::Error Module::load_method(
201201
method_holder.planned_buffers.back().data(), buffer_size);
202202
}
203203
method_holder.planned_memory =
204-
std::make_unique<runtime::HierarchicalAllocator>(
205-
runtime::Span(
206-
method_holder.planned_spans.data(),
207-
method_holder.planned_spans.size()));
204+
std::make_unique<runtime::HierarchicalAllocator>(runtime::Span(
205+
method_holder.planned_spans.data(),
206+
method_holder.planned_spans.size()));
208207
planned_memory = method_holder.planned_memory.get();
209208
}
210209
method_holder.memory_manager = std::make_unique<runtime::MemoryManager>(
211-
memory_allocator_.get(),
212-
planned_memory,
213-
temp_allocator_.get());
210+
memory_allocator_.get(), planned_memory, temp_allocator_.get());
214211
method_holder.method = ET_UNWRAP_UNIQUE(program_->load_method(
215212
method_name.c_str(),
216213
method_holder.memory_manager.get(),

extension/module/module.h

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

170-
ET_DEPRECATED ET_NODISCARD
171-
runtime::Error inline load_method(
172-
const std::string& method_name,
173-
torch::executor::EventTracer* event_tracer) {
170+
ET_DEPRECATED ET_NODISCARD runtime::Error inline load_method(
171+
const std::string& method_name,
172+
torch::executor::EventTracer* event_tracer) {
174173
return load_method(method_name, nullptr, event_tracer);
175174
}
176175

0 commit comments

Comments
 (0)