Skip to content

Commit 70cb9cf

Browse files
jan-wassenbergcopybara-github
authored andcommitted
Separate profiler output for image token generation
PiperOrigin-RevId: 880895239
1 parent bea8b1c commit 70cb9cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

gemma/gemma.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,10 @@ void GenerateImageTokensT(const ModelConfig& config,
740740
// Weights are for the full PaliGemma model, not just the ViT part.
741741
PrefillVit(config, weights, prefill_runtime_config, image, image_tokens,
742742
prefill_activations, env);
743+
744+
// No-op if the profiler is disabled. Printing now ensures that the
745+
// `PrintResults` after prefill does not include the image token part.
746+
env.ctx.profiler.PrintResults();
743747
}
744748

745749
// NOLINTNEXTLINE(google-readability-namespace-comments)

0 commit comments

Comments
 (0)