Skip to content

Commit bda5173

Browse files
authored
Revert "Runner logs (#15279)" (#15362)
This reverts commit 8ce3095. ### Summary [PLEASE REMOVE] See [CONTRIBUTING.md's Pull Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests) for ExecuTorch PR guidelines. [PLEASE REMOVE] If this PR closes an issue, please add a `Fixes #<issue-id>` line. [PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: <area>" label. For a list of available release notes labels, check out [CONTRIBUTING.md's Pull Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests). ### Test plan [PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.
1 parent 8f0e8a8 commit bda5173

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

extension/llm/runner/text_llm_runner.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ Error TextLLMRunner::generate(
175175
stats_->first_token_ms = time_in_ms();
176176
stats_->prompt_eval_end_ms = time_in_ms();
177177

178-
RUNNER_ET_LOG(
179-
config.warming,
180-
"RSS after prompt prefill: %f MiB (0 if unsupported)",
181-
get_rss_bytes() / 1024.0 / 1024.0);
182-
183178
// print the first token from prefill. No prev_token so use cur_token for it.
184179
auto decode_result = tokenizer_->decode(cur_token, cur_token);
185180
if (!decode_result.ok()) {
@@ -190,6 +185,10 @@ Error TextLLMRunner::generate(
190185
return ::executorch::runtime::Error::InvalidArgument;
191186
}
192187
wrapped_callback(std::move(*decode_result));
188+
RUNNER_ET_LOG(
189+
config.warming,
190+
"RSS after prompt prefill: %f MiB (0 if unsupported)",
191+
get_rss_bytes() / 1024.0 / 1024.0);
193192

194193
// start the main loop
195194
prompt_tokens.push_back(cur_token);

extension/llm/runner/text_token_generator.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,9 @@ class ET_EXPERIMENTAL TextTokenGenerator {
128128
if (eos_ids_->find(cur_token) != eos_ids_->end()) {
129129
printf("\n");
130130
ET_LOG(Info, "\nReached to the end of generation");
131-
return pos - start_pos;
131+
break;
132132
}
133133
}
134-
ET_LOG(
135-
Info,
136-
"\nFinished generation. Generated %" PRIi32 " tokens.",
137-
start_pos + max_new_tokens);
138134
return pos - start_pos;
139135
}
140136

0 commit comments

Comments
 (0)