Skip to content

Commit 5a75ccc

Browse files
committed
Fix CI
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 29991e4 commit 5a75ccc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

extension/llm/runner/text_prefiller.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ ::executorch::runtime::Result<uint64_t> TextPrefiller::prefill(
4343
{1, num_prompt_tokens},
4444
exec_aten::ScalarType::Long);
4545

46-
auto start_pos = from_blob(&start_pos, {1}, exec_aten::ScalarType::Long);
46+
auto start_pos_tensor =
47+
from_blob(&start_pos, {1}, exec_aten::ScalarType::Long);
4748

48-
auto outputs_res = text_decoder_runner_->step(tokens, start_pos);
49+
auto outputs_res = text_decoder_runner_->step(tokens, start_pos_tensor);
4950

5051
ET_CHECK_OK_OR_RETURN_ERROR(outputs_res.error());
5152
ET_LOG(
@@ -61,12 +62,13 @@ ::executorch::runtime::Result<uint64_t> TextPrefiller::prefill(
6162
// initialize tensor wrappers
6263
auto tokens = from_blob(&cur_token, {1, 1}, exec_aten::ScalarType::Long);
6364

64-
auto start_pos = from_blob(&start_pos, {1}, exec_aten::ScalarType::Long);
65+
auto start_pos_tensor =
66+
from_blob(&start_pos, {1}, exec_aten::ScalarType::Long);
6567

6668
// run the first token and get back logits tensor. Assuming the first token
6769
// is bos so don't callback.
6870
auto logits_tensor =
69-
ET_UNWRAP(text_decoder_runner_->step(tokens, start_pos));
71+
ET_UNWRAP(text_decoder_runner_->step(tokens, start_pos_tensor));
7072

7173
pos += 1; // start the loop from index 1
7274
start_pos += 1;
@@ -76,7 +78,8 @@ ::executorch::runtime::Result<uint64_t> TextPrefiller::prefill(
7678
// NOLINTNEXTLINE(facebook-hte-ParameterUncheckedArrayBounds)
7779
cur_token = prompt_tokens[pos];
7880

79-
logits_tensor = ET_UNWRAP(text_decoder_runner_->step(tokens, start_pos));
81+
logits_tensor =
82+
ET_UNWRAP(text_decoder_runner_->step(tokens, start_pos_tensor));
8083

8184
pos++;
8285
start_pos++;

0 commit comments

Comments
 (0)