This is an automated email from the ASF dual-hosted git repository.
ruihangl pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new 44d80e5107 [Unity][Bugfix] Reset window cache current pos when
clearing (#16132)
44d80e5107 is described below
commit 44d80e5107d72bd47c81cf2e4cc762c17d66c1d9
Author: Charlie Ruan <[email protected]>
AuthorDate: Thu Nov 16 19:03:22 2023 -0500
[Unity][Bugfix] Reset window cache current pos when clearing (#16132)
Rest window attention current pos when clearning cache
---
src/runtime/relax_vm/lm_support.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/runtime/relax_vm/lm_support.cc
b/src/runtime/relax_vm/lm_support.cc
index e56a03fdea..fbff8ff029 100644
--- a/src/runtime/relax_vm/lm_support.cc
+++ b/src/runtime/relax_vm/lm_support.cc
@@ -89,7 +89,10 @@ class AttentionKVCacheObj : public Object {
}
/** Clear the cache */
- void Clear() { this->fill_count = 0; }
+ void Clear() {
+ this->fill_count = 0;
+ this->window_attention_current_pos = 0;
+ }
/** pop n entries */
void PopN(size_t n) {