Commit 38571cde authored by zhuwenwen's avatar zhuwenwen
Browse files

[fix]修复模型注册失败及其他报错

parent 5d477453
......@@ -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,
......
......@@ -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`,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment