Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ def _kpool_indexer_prefill_with_output(
)
if not return_indices:
return
if result is None or result.shape != (n, output.shape[1]):
raise ValueError("Pooled-indexer prefill returned an unexpected top-k shape")
num_logical = sum(forward_batch.extend_seq_lens_cpu)
if (
result is None
or result.ndim != 2
or not num_logical <= result.shape[0] <= n
or result.shape[1] != output.shape[1]
):
raise ValueError(
"Pooled-indexer prefill returned an unexpected top-k shape: got "
f"{None if result is None else tuple(result.shape)}, expected "
f"between {num_logical} and {n} rows of width {output.shape[1]}"
)
# The following captured attention segment reads this stable padded buffer.
output[:n].copy_(result)
output[n:].fill_(-1)
output[:num_logical].copy_(result[:num_logical])
output[num_logical:].fill_(-1)


def _kpool_indexer_prefill_capture_stub(
Expand Down
2 changes: 2 additions & 0 deletions test/registered/e2e/models/test_glm53_flash_b200.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class TestGLM53FlashB200HighThroughput(
"--enable-dp-attention",
"--dp-size",
"4",
"--cuda-graph-backend-prefill",
"breakable",
Comment on lines +111 to +112

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why add this? I think GLM 5.3 Flash hasn't supported BCG yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See #38522

]


Expand Down
Loading