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
490a1f39
"model/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "33801c1597edca5dd04c5de117db89b5bc27f43a"
Unverified
Commit
490a1f39
authored
Jul 20, 2024
by
Lianmin Zheng
Committed by
GitHub
Jul 20, 2024
Browse files
Fix cuda graph with flashinfer (#675)
parent
06487f12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
benchmark/gsm8k/bench_sglang.py
benchmark/gsm8k/bench_sglang.py
+1
-1
python/sglang/srt/managers/controller/cuda_graph_runner.py
python/sglang/srt/managers/controller/cuda_graph_runner.py
+2
-2
No files found.
benchmark/gsm8k/bench_sglang.py
View file @
490a1f39
...
@@ -64,7 +64,7 @@ def main(args):
...
@@ -64,7 +64,7 @@ def main(args):
@
sgl
.
function
@
sgl
.
function
def
few_shot_gsm8k
(
s
,
question
):
def
few_shot_gsm8k
(
s
,
question
):
s
+=
few_shot_examples
+
question
s
+=
few_shot_examples
+
question
s
+=
sgl
.
gen
(
"answer"
,
max_tokens
=
256
,
stop
=
"Question"
)
s
+=
sgl
.
gen
(
"answer"
,
max_tokens
=
512
,
stop
=
"Question"
)
#####################################
#####################################
########## SGL Program End ##########
########## SGL Program End ##########
...
...
python/sglang/srt/managers/controller/cuda_graph_runner.py
View file @
490a1f39
...
@@ -150,8 +150,8 @@ class CudaGraphRunner:
...
@@ -150,8 +150,8 @@ class CudaGraphRunner:
index
=
bisect
.
bisect_left
(
self
.
batch_size_list
,
raw_bs
)
index
=
bisect
.
bisect_left
(
self
.
batch_size_list
,
raw_bs
)
bs
=
self
.
batch_size_list
[
index
]
bs
=
self
.
batch_size_list
[
index
]
if
bs
!=
raw_bs
:
if
bs
!=
raw_bs
:
self
.
seq_lens
.
zero
_
()
self
.
seq_lens
.
fill
_
(
1
)
self
.
position_ids_offsets
.
fill
_
(
1
)
self
.
position_ids_offsets
.
zero
_
()
self
.
out_cache_loc
.
zero_
()
self
.
out_cache_loc
.
zero_
()
# Common inputs
# Common inputs
...
...
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