Unverified Commit 2e130b76 authored by zhangzuo21's avatar zhangzuo21 Committed by GitHub
Browse files

[HiCache]bug fix: fixed blank item in host_mem_release_queue (#11005)


Co-authored-by: default avatarZuoyuan Zhang <zuoyuanzhang@ZuoyuandeMacBook-Pro.local>
Co-authored-by: default avatarZhiqiang Xie <xiezhq@stanford.edu>
parent ac1f2928
......@@ -575,9 +575,11 @@ class HiCacheController:
return operation.completed_tokens, operation.hash_value
def append_host_mem_release(self, host_indices: torch.Tensor):
chunks = host_indices.split(self.mem_pool_host.page_size)
for chunk in chunks:
self.host_mem_release_queue.put(chunk)
if host_indices.numel() == 0:
return
pages = host_indices.split(self.mem_pool_host.page_size)
for page in pages:
self.host_mem_release_queue.put(page)
def _page_get_zero_copy(self, operation, hash_values, host_indices):
results = self.storage_backend.batch_get_v1(hash_values, host_indices)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment