[HiCache][LoRA] Simplify decode offload hash inputs (#39162)
Co-authored-by: Shuwen Wang <47200617+alphabetc1@users.noreply.github.com> Co-authored-by: alphabetc1 <2508695655@qq.com>
This commit is contained in:
co-authored by
Shuwen Wang
alphabetc1
parent
f539c1fc65
commit
4c71d14fba
@@ -138,8 +138,9 @@ class TestReleaseFinishedReq(unittest.TestCase):
|
||||
]:
|
||||
with self.subTest(extra_key=extra_key, cache_salt=cache_salt):
|
||||
namespace = dict(extra_key=extra_key, cache_salt=cache_salt)
|
||||
prefix = manager._compute_prefix_hash(tokens[:4], **namespace)
|
||||
tail = manager._compute_prefix_hash(tokens[4:], prefix[-1], **namespace)
|
||||
req = SimpleNamespace(**namespace)
|
||||
prefix = manager._compute_prefix_hash(req, tokens[:4])
|
||||
tail = manager._compute_prefix_hash(req, tokens[4:], prefix[-1])
|
||||
self.assertEqual(
|
||||
prefix + tail,
|
||||
get_storage_hash_str(RadixKey(tokens, **namespace), page_size=2),
|
||||
|
||||
Reference in New Issue
Block a user