Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion vllm/model_executor/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def verify_and_update_config(cls, vllm_config: "VllmConfig") -> None:
# easily by changing the way we layout chunks in the
# mamba2 kernels.

base_chunk_size = model_config.get_mamba_chunk_size()
base_chunk_size = mamba_block_size or model_config.get_mamba_chunk_size()
attn_tokens_per_mamba_state = cdiv(mamba_page_size, attn_page_size_1_token)
chunk_size = lcm(base_chunk_size, kernel_block_alignment_size)
attn_block_size = chunk_size * cdiv(attn_tokens_per_mamba_state, chunk_size)
Expand Down
6 changes: 5 additions & 1 deletion vllm/v1/core/sched/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@
)

connector_vllm_config = copy.copy(self.vllm_config)
connector_vllm_config.kv_cache_config = copy.copy(kv_cache_config)

# We're dynamically inserting a kv_cache_config variable into the
# connector_vllm_config. This is distinct from the cache_config
# that is already in there.
connector_vllm_config.kv_cache_config = copy.copy(kv_cache_config) # type: ignore[attr-defined]
self.connector = KVConnectorFactory.create_connector(
config=connector_vllm_config, role=KVConnectorRole.SCHEDULER
)
Expand Down Expand Up @@ -1335,7 +1339,7 @@
assert len(self.kv_cache_config.kv_cache_groups) == 1
return self.connector.request_finished(request, block_ids[0])
else:
return self.connector.request_finished(request, block_ids)

Check failure on line 1342 in vllm/v1/core/sched/scheduler.py

View workflow job for this annotation

GitHub Actions / pre-commit

Argument 2 to "request_finished" of "KVConnectorBase_V1" has incompatible type "tuple[list[int], ...]"; expected "list[int]" [arg-type]

Check failure on line 1342 in vllm/v1/core/sched/scheduler.py

View workflow job for this annotation

GitHub Actions / pre-commit

Argument 2 to "request_finished" of "KVConnectorBase_V1" has incompatible type "tuple[list[int], ...]"; expected "list[int]" [arg-type]

Check failure on line 1342 in vllm/v1/core/sched/scheduler.py

View workflow job for this annotation

GitHub Actions / pre-commit

Argument 2 to "request_finished" of "KVConnectorBase_V1" has incompatible type "tuple[list[int], ...]"; expected "list[int]" [arg-type]

Check failure on line 1342 in vllm/v1/core/sched/scheduler.py

View workflow job for this annotation

GitHub Actions / pre-commit

Argument 2 to "request_finished" of "KVConnectorBase_V1" has incompatible type "tuple[list[int], ...]"; expected "list[int]" [arg-type]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return self.connector.request_finished(request, block_ids) # type: ignore[attr-defined]

Should be able to just ignore the type check here, this line will not be hit at the current state (no connector implements HMA interface).

For future reference, I think request_finished_all_groups should be called here as it is defined in SupportHMA interface and has the correct function signature.

Copy link
Member Author

Choose a reason for hiding this comment

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

Switched to request_finished_all_groups


def _update_waiting_for_remote_kv(self, request: Request) -> bool:
"""
Expand Down
Loading