BugFix(hicache): Fix host indices out of bound error (#9637)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
This commit is contained in:
@@ -616,12 +616,13 @@ class HiCacheController:
|
|||||||
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
|
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
self.mem_pool_host.set_from_flat_data_page(
|
if operation.increment(self.page_size):
|
||||||
host_indices[operation.completed_tokens],
|
self.mem_pool_host.set_from_flat_data_page(
|
||||||
page_data[i],
|
host_indices[i * self.page_size],
|
||||||
)
|
page_data[i],
|
||||||
if not operation.increment(self.page_size):
|
)
|
||||||
break # Operation terminated by controller
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
def _page_transfer(self, operation):
|
def _page_transfer(self, operation):
|
||||||
# Select the get function and batch size
|
# Select the get function and batch size
|
||||||
|
|||||||
Reference in New Issue
Block a user