Skip to content

[NixlConnector] Drop num_blocks check #19532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,6 @@ def add_remote_agent(self,
assert self.block_size == remote_block_size, "Remote P worker with " \
"different block size is not supported"

assert self.num_blocks >= nixl_agent_meta.num_blocks

Comment on lines -706 to -707
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a debug log here, maybe would be helpful downstream when debugging.

otherwise this makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you can already grab the num_blocks value easily from the logs.
I'd rather replace this assert with a more sensible one involving max number of reqs to transfer.

# Create dst descs and xfer side handles. TP workers have same #blocks.
if engine_id in self.dst_num_blocks:
assert self.dst_num_blocks[engine_id] == nixl_agent_meta.num_blocks
Copy link

Choose a reason for hiding this comment

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

Does this assert need to be removed as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GuanLuo I am expecting workers in the same TP group to have the same number of blocks. This should be enforced here

unify_kv_cache_configs(kv_cache_configs)
.

Let me know if you run into any more issues.

Expand Down