Commit c3f08d2
fix: clear KV cache and reset batch state between sequential decode c (RunanywhereAI#393)
* fix: clear KV cache and reset batch state between sequential decode calls on arm64
* fix: address bot review comments - null guard, decode failure flag, error details, and JNI exception fallback
* fix: make decode_failed_ std::atomic for thread safety (review)
---------
Co-authored-by: sakirr <sakirahmed75531@gmail.com>1 parent 7094a8c commit c3f08d2
File tree
4 files changed
+46
-3
lines changed- sdk/runanywhere-commons/src
- backends/llamacpp
- jni
4 files changed
+46
-3
lines changedLines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
533 | 535 | | |
534 | 536 | | |
535 | 537 | | |
| |||
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
551 | 560 | | |
| 561 | + | |
552 | 562 | | |
553 | 563 | | |
554 | 564 | | |
| |||
717 | 727 | | |
718 | 728 | | |
719 | 729 | | |
| 730 | + | |
720 | 731 | | |
721 | 732 | | |
722 | 733 | | |
| |||
725 | 736 | | |
726 | 737 | | |
727 | 738 | | |
728 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
729 | 742 | | |
730 | 743 | | |
731 | 744 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
| |||
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
568 | 567 | | |
569 | 568 | | |
570 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
571 | 582 | | |
572 | 583 | | |
573 | 584 | | |
| |||
863 | 874 | | |
864 | 875 | | |
865 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
866 | 888 | | |
867 | 889 | | |
868 | 890 | | |
| |||
0 commit comments