[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)
|
||||
|
||||
Reference in new issue
Block a user