Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
01ca82d7
"git@developer.sourcefind.cn:OpenDAS/torchani.git" did not exist on "22975fa7b1b670ebd5de9b6ddc754a65c70c5140"
Unverified
Commit
01ca82d7
authored
Jan 16, 2024
by
Liangsheng Yin
Committed by
GitHub
Jan 15, 2024
Browse files
fix radix cache match (#7)
parent
4bd8233f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/managers/router/radix_cache.py
python/sglang/srt/managers/router/radix_cache.py
+2
-2
No files found.
python/sglang/srt/managers/router/radix_cache.py
View file @
01ca82d7
...
@@ -116,12 +116,12 @@ class RadixCache:
...
@@ -116,12 +116,12 @@ class RadixCache:
for
c_key
,
child
in
node
.
children
.
items
():
for
c_key
,
child
in
node
.
children
.
items
():
prefix_len
=
match
(
c_key
,
key
)
prefix_len
=
match
(
c_key
,
key
)
if
prefix_len
!=
0
:
if
prefix_len
!=
0
:
if
prefix_len
==
len
(
key
)
and
prefix_len
!=
len
(
c_key
):
if
prefix_len
<
len
(
c_key
):
new_node
=
self
.
_split_node
(
c_key
,
child
,
prefix_len
)
new_node
=
self
.
_split_node
(
c_key
,
child
,
prefix_len
)
value
.
append
(
new_node
.
value
)
value
.
append
(
new_node
.
value
)
last_node
[
0
]
=
new_node
last_node
[
0
]
=
new_node
else
:
else
:
value
.
append
(
child
.
value
[:
prefix_len
]
)
value
.
append
(
child
.
value
)
last_node
[
0
]
=
child
last_node
[
0
]
=
child
self
.
_match_prefix_helper
(
child
,
key
[
prefix_len
:],
value
,
last_node
)
self
.
_match_prefix_helper
(
child
,
key
[
prefix_len
:],
value
,
last_node
)
break
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment