Why does host kvcache need to be larger than device cache #13437
-
|
In host cache implementaion, there is an assertion assert (
self.size > device_pool.size
), "The host memory should be larger than the device memory with the current protocol"I want to know why this assertion is necessary. Even if the host cache is smaller than the device cache, it should still work properly |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
@xiezhq-hermann Can you explain this? |
Beta Was this translation helpful? Give feedback.
-
|
In extreme cases, such as when there's no storage backend and the device cache is full, offloading to hicache will cause an OOM error. To better handle this case, a more sophisticated method should be used, eliminating the need to ensure the host KV cache is larger than the device cache. |
Beta Was this translation helpful? Give feedback.
In extreme cases, such as when there's no storage backend and the device cache is full, offloading to hicache will cause an OOM error. To better handle this case, a more sophisticated method should be used, eliminating the need to ensure the host KV cache is larger than the device cache.