[NPU] chore: bump to CANN 8.3.RC1 and Pytorch 2.8.0 (#13647)

This commit is contained in:
Even Zhou
2025-11-21 17:07:08 +08:00
committed by GitHub
parent a244c0309c
commit 589d9ad55b
10 changed files with 66 additions and 83 deletions

View File

@@ -27,6 +27,7 @@ runtime_common = [
"datasets",
"einops",
"fastapi",
"gguf",
"hf_transfer",
"huggingface_hub",
"interegular",

View File

@@ -311,9 +311,15 @@ class HIPEnv(BaseEnv):
class NPUEnv(BaseEnv):
"""Environment checker for Ascend NPU"""
EXTRA_PACKAGE_LIST = [
"torch_npu",
"sgl-kernel-npu",
"deep_ep",
]
def __init__(self):
super().__init__()
self.package_list = ["torch_npu", "sgl-kernel-npu"] + self.package_list
self.package_list.extend(NPUEnv.EXTRA_PACKAGE_LIST)
def get_info(self):
cuda_info = {"NPU available": torch.npu.is_available()}

View File

@@ -376,7 +376,7 @@ class AscendAttnBackend(AttentionBackend):
num_key_value_heads=layer.tp_k_head_num,
input_layout="BSND", # todo, TND not supports q_heads!=k_heads
atten_mask=self.fia_mask.unsqueeze(0),
sparse_mode=3,
sparse_mode=3 if q_len != 1 else 0,
scale=layer.scaling,
next_tokens=0,
)[0]

View File

@@ -1245,8 +1245,8 @@ def run_bench_offline_throughput(model, other_args):
try:
stdout, stderr = process.communicate()
output = stdout.decode()
error = stderr.decode()
output = stdout.decode(errors="backslashreplace")
error = stderr.decode(errors="backslashreplace")
print(f"Output: {output}", flush=True)
print(f"Error: {error}", flush=True)