"tests/vscode:/vscode.git/clone" did not exist on "9088c6359299978390430821c23a2cfd0cb8ffeb"
Unverified Commit 79ce3688 authored by hzh0425's avatar hzh0425 Committed by GitHub
Browse files

BugFix(hicache): Fix host indices out of bound error (#9637)


Co-authored-by: default avatarZhiqiang Xie <xiezhq@stanford.edu>
parent 44ffe2cb
......@@ -616,12 +616,13 @@ class HiCacheController:
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
)
break
self.mem_pool_host.set_from_flat_data_page(
host_indices[operation.completed_tokens],
page_data[i],
)
if not operation.increment(self.page_size):
break # Operation terminated by controller
if operation.increment(self.page_size):
self.mem_pool_host.set_from_flat_data_page(
host_indices[i * self.page_size],
page_data[i],
)
else:
break
def _page_transfer(self, operation):
# Select the get function and batch size
......
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