Ascend attention backend(PA&MLA) (#7722)
Co-authored-by: Maksim <makcum888e@mail.ru> Co-authored-by: VDV1985 <vladdv85@mail.ru>
This commit is contained in:
co-authored by
Maksim
VDV1985
parent
b58226510f
commit
1e0e549766
@@ -3,7 +3,6 @@ from typing import Callable, List, Optional, Tuple
|
||||
|
||||
import einops
|
||||
import torch
|
||||
from sgl_kernel import silu_and_mul
|
||||
from torch.nn import Module
|
||||
|
||||
from sglang.srt.custom_op import CustomOp
|
||||
@@ -50,13 +49,18 @@ from sglang.srt.utils import (
|
||||
dispose_tensor,
|
||||
get_bool_env_var,
|
||||
is_hip,
|
||||
is_npu,
|
||||
set_weight_attrs,
|
||||
)
|
||||
|
||||
_is_hip = is_hip()
|
||||
_is_npu = is_npu()
|
||||
_is_fp8_fnuz = is_fp8_fnuz()
|
||||
_use_aiter = get_bool_env_var("SGLANG_USE_AITER") and _is_hip
|
||||
|
||||
if not _is_npu:
|
||||
from sgl_kernel import silu_and_mul
|
||||
|
||||
if _is_hip:
|
||||
from vllm._custom_ops import scaled_fp8_quant
|
||||
|
||||
|
||||
Reference in New Issue
Block a user