[NPU] chore: bump to CANN 8.3.RC1 and Pytorch 2.8.0 (#13647)
This commit is contained in:
@@ -27,6 +27,7 @@ runtime_common = [
|
||||
"datasets",
|
||||
"einops",
|
||||
"fastapi",
|
||||
"gguf",
|
||||
"hf_transfer",
|
||||
"huggingface_hub",
|
||||
"interegular",
|
||||
|
||||
@@ -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()}
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user