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
ox696c
ktransformers
Commits
b40f13ab
Commit
b40f13ab
authored
May 15, 2025
by
qiyuxinlin
Browse files
fix deduplicate_and_sort cudagraphs
parent
d35d61f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ktransformers/operators/experts.py
ktransformers/operators/experts.py
+1
-1
ktransformers/server/balance_serve/inference/model_runner.py
ktransformers/server/balance_serve/inference/model_runner.py
+1
-1
No files found.
ktransformers/operators/experts.py
View file @
b40f13ab
...
@@ -45,7 +45,7 @@ def generate_cuda_graphs(chunk_size: int) -> list:
...
@@ -45,7 +45,7 @@ def generate_cuda_graphs(chunk_size: int) -> list:
base_list
=
[
1
,
2
,
3
,
Config
().
max_batch_size
,
64
,
256
,
512
,
chunk_size
]
base_list
=
[
1
,
2
,
3
,
Config
().
max_batch_size
,
64
,
256
,
512
,
chunk_size
]
if
chunk_size
<=
1024
:
if
chunk_size
<=
1024
:
return
base_list
return
deduplicate_and_sort
(
base_list
)
multiples
=
[
i
for
i
in
range
(
1024
,
chunk_size
+
1
,
1024
)]
multiples
=
[
i
for
i
in
range
(
1024
,
chunk_size
+
1
,
1024
)]
...
...
ktransformers/server/balance_serve/inference/model_runner.py
View file @
b40f13ab
...
@@ -45,7 +45,7 @@ def generate_cuda_graphs(chunk_size: int) -> list:
...
@@ -45,7 +45,7 @@ def generate_cuda_graphs(chunk_size: int) -> list:
base_list
=
[
1
,
2
,
3
,
Config
().
max_batch_size
,
64
,
256
,
512
,
chunk_size
]
base_list
=
[
1
,
2
,
3
,
Config
().
max_batch_size
,
64
,
256
,
512
,
chunk_size
]
if
chunk_size
<=
1024
:
if
chunk_size
<=
1024
:
return
base_list
return
deduplicate_and_sort
(
base_list
)
multiples
=
[
i
for
i
in
range
(
1024
,
chunk_size
+
1
,
1024
)]
multiples
=
[
i
for
i
in
range
(
1024
,
chunk_size
+
1
,
1024
)]
...
...
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