[BugFix][NPU] Fix Fish Speech S2 Pro NPU support (#7546)
Signed-off-by: Lei Ke <1141466880@qq.com>
This commit is contained in:
1 parent
4392af5ce3
commit
38c7eeee4c
5 files changed
+40
-1
No files matched your search
@@ -3,6 +3,7 @@
|
||||
|
||||
import pytest
|
||||
import torch
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
from vllm_omni.attention import fish_kvcache_attn, fish_kvcache_backend
|
||||
|
||||
@@ -113,6 +114,15 @@ def test_fish_kvcache_enabled_by_default(monkeypatch):
|
||||
assert not fish_kvcache_attn.is_fish_kvcache_attn_required()
|
||||
|
||||
|
||||
def test_fish_kvcache_fast_path_is_unavailable_off_cuda(monkeypatch):
|
||||
monkeypatch.setattr(current_platform, "is_cuda", lambda: False)
|
||||
monkeypatch.setattr(
|
||||
fish_kvcache_attn, "_triton_backend", lambda: pytest.fail("Triton backend must not load off CUDA")
|
||||
)
|
||||
|
||||
assert not fish_kvcache_attn.is_available()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("value", ["", "1", "true", "yes", "on", "required"])
|
||||
def test_fish_kvcache_enabled_values_are_consistent(monkeypatch, value):
|
||||
monkeypatch.setenv("VLLM_OMNI_FISH_KVCACHE_ATTN", value)
|
||||
|
||||
@@ -2688,6 +2688,13 @@ class TestPlatformOverrides:
|
||||
# Explicit null clears the inherited single-GPU 2 GiB CUDA cap.
|
||||
assert replica_stages[1].yaml_engine_args.get("kv_cache_memory_bytes") is None
|
||||
|
||||
def test_fish_speech_npu_uses_ascend_kv_block_size(self):
|
||||
deploy_path = Path(get_deploy_config_path("fish_qwen3_omni.yaml"))
|
||||
|
||||
deploy = _apply_platform_overrides(load_deploy_config(deploy_path), platform="npu")
|
||||
|
||||
assert deploy.stages[0].engine_extras["block_size"] == 128
|
||||
|
||||
def test_npu_overrides(self):
|
||||
deploy_path = Path(get_deploy_config_path("qwen3_omni_moe.yaml"))
|
||||
if not deploy_path.exists():
|
||||
|
||||
Reference in new issue
Block a user