Skip to content
Draft
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
7 changes: 7 additions & 0 deletions vllm/_custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,13 @@ def topk_hash_softplus_sqrt(
input_tokens: torch.Tensor | None = None,
hash_indices_table: torch.Tensor | None = None,
) -> None:
if hash_indices_table is not None:
assert input_tokens is not None
if input_tokens.dtype != topk_indices.dtype:
input_tokens = input_tokens.to(dtype=topk_indices.dtype)
if hash_indices_table.dtype != topk_indices.dtype:
hash_indices_table = hash_indices_table.to(dtype=topk_indices.dtype)

torch.ops._moe_C.topk_softplus_sqrt(
topk_weights,
topk_indices,
Expand Down
Loading