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:
ronnie_zheng
2025-07-03 09:23:19 -07:00
committed by GitHub
co-authored by Maksim VDV1985
parent b58226510f
commit 1e0e549766
17 changed files with 842 additions and 16 deletions
+5 -1
View File
@@ -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