Skip to content
Closed
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
4 changes: 2 additions & 2 deletions tensorrt_llm/_torch/pyexecutor/sampler/sampler_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def sample(
logits,
beam_width_in=cast(int, beam_width_in),
beam_width_out=cast(int, beam_width_out),
row_stride=cast(int, row_stride),
row_stride=row_stride,
beam_search_args=group_metadata,
temperature=cast(float, temperature),
early_stopping=cast(int, early_stopping),
Expand Down Expand Up @@ -1341,7 +1341,7 @@ def sample_grouped_strategies(
# variable-beam-width step; the op slices down to the live beams.
rows_per_request = beam_width_in
if strategies and strategies[0][0] == "beam_search":
rows_per_request = cast(BeamSearch, strategies[0]).row_stride
rows_per_request = strategies[0].row_stride

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

#17601 already provides the complete typed-pattern fix across this function, while #17637 carries the alternative suppression. Could this PR be closed or rebased after one approach lands instead of adding a third, partial implementation?

assert logits.size(0) == rows_per_request * len(strategies)
else:
assert group_logit_indices.size(0) == beam_width_in * len(strategies)
Expand Down
Loading