Skip to content

Commit bd5b601

Browse files
committed
lint
1 parent 7336416 commit bd5b601

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.ci/scripts/cuda_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def create_metric_stats(
721721
{"trimmed_runs": len(trimmed_throughput)},
722722
),
723723
prefill_throughput=create_metric_stats(
724-
"prefill_throughput(tokens/sec)",
724+
"prefill_encoder_throughput(tokens/sec)",
725725
[r.prefill_tokens_per_sec for r in results],
726726
"t/s",
727727
),

extension/asr/runner/runner.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ Result<std::vector<int64_t>> AsrRunner::transcribe(
242242
ET_CHECK_OK_OR_RETURN_ERROR(encoder_result.error());
243243

244244
stats_.prompt_eval_end_ms = ::executorch::extension::llm::time_in_ms();
245-
stats_.num_prompt_tokens = 0;
246245

247246
auto encoder_outputs = std::move(*encoder_result);
248247
ET_CHECK_OR_RETURN_ERROR(
@@ -254,6 +253,11 @@ Result<std::vector<int64_t>> AsrRunner::transcribe(
254253
::executorch::aten::Tensor encoder_output_tensor =
255254
std::move(encoder_outputs[0]).toTensor();
256255

256+
// Use encoder output sequence length as "prompt tokens" for throughput
257+
stats_.num_prompt_tokens =
258+
static_cast<int64_t>(encoder_output_tensor.size(1));
259+
std::move(encoder_outputs[0]).toTensor();
260+
257261
ET_LOG(
258262
Info,
259263
"Encoder output shape: [%zu, %zu, %zu]",

0 commit comments

Comments
 (0)