Skip to content
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
8 changes: 1 addition & 7 deletions python/sglang/srt/mem_cache/memory_pool_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,13 +1729,7 @@ def alloc(self, need_size: int) -> Optional[torch.Tensor]:
return self.anchor_entry.host_pool.alloc(need_size)

def free(self, indices: torch.Tensor) -> int:
n = self.anchor_entry.host_pool.free(indices)
for entry in self.entries:
if entry is self.anchor_entry:
continue
if getattr(entry, "share_indices_with_anchor", False):
entry.host_pool.free(indices)
return n
return self.anchor_entry.host_pool.free(indices)
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.

medium

The removal of the mirroring logic in free makes the documentation for share_indices_with_anchor in the PoolEntry dataclass (line 1666) stale and incorrect. It still claims that HostPoolGroup.free mirrors frees to the pool when this flag is enabled. Please update the comment in the PoolEntry definition to reflect that mirroring is no longer performed.


def get_data_page(self, index, flat: bool = True):
return self.anchor_entry.host_pool.get_data_page(index, flat)
Expand Down
Loading