Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
1a9775b8
"vscode:/vscode.git/clone" did not exist on "c6187f55f7c4844ed9ff5630d41114cbe6fccb6b"
Commit
1a9775b8
authored
Dec 03, 2024
by
gaoqiong
Browse files
增加w8a8的triton调度支持
parent
1c77f16e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
vllm/model_executor/models/llama.py
vllm/model_executor/models/llama.py
+2
-1
vllm/model_executor/models/qwen.py
vllm/model_executor/models/qwen.py
+2
-1
vllm/utils.py
vllm/utils.py
+3
-1
No files found.
vllm/model_executor/models/llama.py
View file @
1a9775b8
...
...
@@ -681,7 +681,8 @@ class LlamaForCausalLM(nn.Module, SupportsLoRA):
json_file
=
self
.
tritonsingleton
.
get_w8a8json_name
(
n
,
k
)
configs_dict
=
self
.
tritonsingleton
.
get_triton_cache
(
json_file
,
n
,
k
)
all_json
.
update
(
configs_dict
)
if
configs_dict
:
all_json
.
update
(
configs_dict
)
if
self
.
w8a8_strategy
==
1
:
self
.
tritonsingleton
.
triton_json_dict
.
append
(
all_json
)
...
...
vllm/model_executor/models/qwen.py
View file @
1a9775b8
...
...
@@ -1122,7 +1122,8 @@ class QWenLMHeadModel(nn.Module, SupportsMultiModal):
json_file
=
self
.
tritonsingleton
.
get_w8a8json_name
(
n
,
k
)
configs_dict
=
self
.
tritonsingleton
.
get_triton_cache
(
json_file
,
n
,
k
)
all_json
.
update
(
configs_dict
)
if
configs_dict
:
all_json
.
update
(
configs_dict
)
if
self
.
w8a8_strategy
==
1
:
self
.
tritonsingleton
.
triton_json_dict
.
append
(
all_json
)
...
...
vllm/utils.py
View file @
1a9775b8
...
...
@@ -1414,4 +1414,6 @@ class W8a8GetCacheJSON:
return
configs_dict
def
get_w8a8json_name
(
self
,
n
,
k
):
return
self
.
triton_json_dir
+
f
"/W8A8_
{
n
}
_
{
k
}
_DCUK100AI.json"
device_name
=
current_platform
.
get_device_name
().
replace
(
" "
,
"_"
)
return
self
.
triton_json_dir
+
f
"/W8A8_
{
n
}
_
{
k
}
_DCU
{
device_name
}
.json"
\ No newline at end of file
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