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
38571cde
Commit
38571cde
authored
Apr 01, 2025
by
zhuwenwen
Browse files
[fix]修复模型注册失败及其他报错
parent
5d477453
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
vllm/model_executor/layers/fused_moe/fused_moe.py
vllm/model_executor/layers/fused_moe/fused_moe.py
+5
-5
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+6
-6
No files found.
vllm/model_executor/layers/fused_moe/fused_moe.py
View file @
38571cde
...
...
@@ -1174,7 +1174,7 @@ def invoke_fused_moe_kernel(A: torch.Tensor,
expert_ids
,
num_tokens_post_padded
,
B
.
shape
[
1
]
if
not
use_nn_moe
else
B
.
shape
[
2
],
B
.
shape
[
2
],
A
.
shape
[
1
],
EM
,
topk_ids
.
numel
(),
A
.
stride
(
0
),
...
...
@@ -1551,7 +1551,7 @@ def inplace_fused_experts(hidden_states: torch.Tensor,
w2
:
torch
.
Tensor
,
topk_weights
:
torch
.
Tensor
,
topk_ids
:
torch
.
Tensor
,
activation
:
str
=
"silu"
,
activation
:
Optional
[
str
]
=
None
,
use_fp8_w8a8
:
bool
=
False
,
use_int8_w8a8
:
bool
=
False
,
use_int8_w8a16
:
bool
=
False
,
...
...
@@ -1583,7 +1583,7 @@ def inplace_fused_experts_fake(
w2
:
torch
.
Tensor
,
topk_weights
:
torch
.
Tensor
,
topk_ids
:
torch
.
Tensor
,
activation
:
str
=
"silu"
,
activation
:
Optional
[
str
]
=
None
,
use_fp8_w8a8
:
bool
=
False
,
use_int8_w8a8
:
bool
=
False
,
use_int8_w8a16
:
bool
=
False
,
...
...
@@ -1618,7 +1618,7 @@ def outplace_fused_experts(
w2
:
torch
.
Tensor
,
topk_weights
:
torch
.
Tensor
,
topk_ids
:
torch
.
Tensor
,
activation
:
str
=
"silu"
,
activation
:
Optional
[
str
]
=
None
,
use_fp8_w8a8
:
bool
=
False
,
use_int8_w8a8
:
bool
=
False
,
use_int8_w8a16
:
bool
=
False
,
...
...
@@ -1651,7 +1651,7 @@ def outplace_fused_experts_fake(
w2
:
torch
.
Tensor
,
topk_weights
:
torch
.
Tensor
,
topk_ids
:
torch
.
Tensor
,
activation
:
str
=
"silu"
,
activation
:
Optional
[
str
]
=
None
,
use_fp8_w8a8
:
bool
=
False
,
use_int8_w8a8
:
bool
=
False
,
use_int8_w8a16
:
bool
=
False
,
...
...
vllm/platforms/rocm.py
View file @
38571cde
...
...
@@ -62,12 +62,12 @@ _ROCM_PARTIALLY_SUPPORTED_MODELS: Dict[str, str] = {
}
# Prevent use of clashing `{CUDA/HIP}_VISIBLE_DEVICES``
if
"HIP_VISIBLE_DEVICES"
in
os
.
environ
:
val
=
os
.
environ
[
"HIP_VISIBLE_DEVICES"
]
if
cuda_val
:
=
os
.
environ
.
get
(
"CUDA_VISIBLE_DEVICES"
,
None
):
assert
val
==
cuda_val
else
:
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
val
#
if "HIP_VISIBLE_DEVICES" in os.environ:
#
val = os.environ["HIP_VISIBLE_DEVICES"]
#
if cuda_val := os.environ.get("CUDA_VISIBLE_DEVICES", None):
#
assert val == cuda_val
#
else:
#
os.environ["CUDA_VISIBLE_DEVICES"] = val
# AMDSMI utils
# Note that NVML is not affected by `{CUDA/HIP}_VISIBLE_DEVICES`,
...
...
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