Skip to content
Merged
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
6 changes: 6 additions & 0 deletions vllm_gaudi/extension/bucketing/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ def get_decode_cfgs(self, max_num_seqs, block_size, max_num_batched_tokens, max_
f'VLLM_DECODE_BLOCK_BUCKET_MAX={decode_block_bucket_cfg[2]} is higher than max_blocks={max_blocks}. Your configuration VLLM_DECODE_BLOCK_BUCKET_MAX={decode_block_bucket_cfg[2]} will be overwritten to VLLM_DECODE_BLOCK_BUCKET_MAX={max_blocks}'
)
decode_block_bucket_cfg[2] = max_blocks
if decode_block_bucket_cfg[0] > max_blocks:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it indented under if decode_block_bucket_cfg[2] > max_blocks:?

Copy link
Contributor Author

@dsocek dsocek Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only need to run this conditional check if max has been potentially modified and set to max_blocks. If indented to outer scope, it can work too but would unnecessarily spend cycles.

decode_block_bucket_min = max(1, max_blocks - decode_block_bucket_cfg[1])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we subtracting step from max blocks? We don't we just change it to max blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately if min is set to max_blocks it causes error. Setting to 1 step before max resolves the issue.

logger().info(
f'VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_cfg[0]} is higher than max_blocks={max_blocks}. Your configuration VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_cfg[0]} will be overwritten to VLLM_DECODE_BLOCK_BUCKET_MIN={decode_block_bucket_min}'
)
decode_block_bucket_cfg[0] = decode_block_bucket_min

msg = ("Decode bucket config (min, step, max_warmup) "
f"bs:{decode_bs_bucket_cfg}, "
Expand Down