Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add real BS & seq_len to profiling #601

Open
wants to merge 1 commit into
base: habana_main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions vllm/worker/hpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,10 @@
self.trim_attn_metadata(
broadcast_data["attn_metadata"])
})
with self.profiler.record_event('internal', model_event_name):
with self.profiler.record_event('internal',
model_event_name,
args = {'real_seq_len': model_input.seq_lens,

Check failure on line 2091 in vllm/worker/hpu_model_runner.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (E501)

vllm/worker/hpu_model_runner.py:2091:81: E501 Line too long (93 > 80)
'real_batch_size': real_batch_size}):

Check failure on line 2092 in vllm/worker/hpu_model_runner.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (E501)

vllm/worker/hpu_model_runner.py:2092:81: E501 Line too long (93 > 80)
hidden_states = self.model.forward(
**execute_model_kwargs,
selected_token_indices=sampling_metadata.
Expand All @@ -2103,7 +2106,9 @@
('compute_logits_'
f'{"prompt" if is_prompt else "decode"}_bs'
f'{batch_size}_'
f'seq{seq_len}')):
f'seq{seq_len}'),
args = {'real_seq_len': model_input.seq_lens,
'real_batch_size': real_batch_size}):
if num_steps == 1:
sampling_metadata.selected_token_indices = None
logits = self.model.compute_logits(hidden_states,
Expand All @@ -2120,7 +2125,9 @@
'internal', ('sample_'
f'{"prompt" if is_prompt else "decode"}_'
f'bs{batch_size}_'
f'seq{seq_len}')):
f'seq{seq_len}'),
args = {'real_seq_len': model_input.seq_lens,

Check failure on line 2129 in vllm/worker/hpu_model_runner.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (E501)

vllm/worker/hpu_model_runner.py:2129:81: E501 Line too long (82 > 80)
'real_batch_size': real_batch_size}):

Check failure on line 2130 in vllm/worker/hpu_model_runner.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (E501)

vllm/worker/hpu_model_runner.py:2130:81: E501 Line too long (81 > 80)
output = self.model.sample(
logits=logits,
sampling_metadata=sampling_metadata,
Expand Down
Loading