Skip to content

Commit 75bd77d

Browse files
committed
Linter
1 parent e18ce85 commit 75bd77d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

extension/llm/runner/multimodal_prefiller.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ Result<uint64_t> MultimodalPrefiller::prefill(
9292

9393
// 2. Run decoder model for prefill.
9494

95-
96-
// Get expected shape of cache position tensor, which should be the second argument
95+
// Get expected shape of cache position tensor, which should be the second
96+
// argument
9797

9898
int64_t seq_len = encoder_output.toTensor().size(1);
9999
if (seq_len == 0) {
100100
ET_LOG(Error, "The encoder returned an empty output.");
101101
return ::executorch::runtime::Error::InvalidState;
102102
}
103-
auto cache_position_tensor = ET_UNWRAP(populate_start_pos_tensor(module_, start_pos, seq_len));
103+
auto cache_position_tensor =
104+
ET_UNWRAP(populate_start_pos_tensor(module_, start_pos, seq_len));
104105

105106
auto prefill_result = module_->execute(
106107
kTextModelMethod, {encoder_output, cache_position_tensor});

extension/llm/runner/text_decoder_runner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ ::executorch::runtime::Result<executorch::aten::Tensor> TextDecoderRunner::step(
5353
auto numel = sizes[0];
5454
std::vector<::executorch::aten::SizesType> sizes_vec = {numel};
5555

56-
auto start_pos_tensor = ET_UNWRAP(populate_start_pos_tensor(module_, start_pos, tokens->numel()));
56+
auto start_pos_tensor = ET_UNWRAP(
57+
populate_start_pos_tensor(module_, start_pos, tokens->numel()));
5758

5859
std::vector<runtime::EValue> inputs;
5960
auto inputs_res = io_manager_->prepare_decode(tokens, start_pos_tensor);

extension/llm/runner/util.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ ET_EXPERIMENTAL size_t inline get_rss_bytes() {
103103
return 0;
104104
}
105105

106-
inline runtime::Result<TensorPtr> populate_start_pos_tensor(Module* module, int64_t& start_pos, int seq_len) {
107-
// Get expected shape of cache position tensor, which should be the second argument
106+
inline runtime::Result<TensorPtr>
107+
populate_start_pos_tensor(Module* module, int64_t& start_pos, int seq_len) {
108+
// Get expected shape of cache position tensor, which should be the second
109+
// argument
108110
auto method_meta = ET_UNWRAP(module->method_meta(kTextModelMethod));
109111
auto second_input_info = ET_UNWRAP(method_meta.input_tensor_meta(1));
110112
auto second_input_sizes = second_input_info.sizes();

0 commit comments

Comments
 (0)