Skip to content

Commit 5349f83

Browse files
committed
test(ascend): skip RoPE unit test without torch-npu
1 parent e07b38b commit 5349f83

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/unit_tests/dispatch/test_ascend_rotary.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
"""Tests for the Ascend rotary embedding implementation."""
44

5+
import pytest
56
import torch
67

78
from vllm_fl.dispatch.backends.reference.impl.rotary import rotary_embedding_torch
8-
from vllm_fl.dispatch.backends.vendor.ascend.impl.rotary import rotary_embedding_ascend
9+
10+
pytest.importorskip("torch_npu")
911

1012

1113
def test_ascend_rotary_falls_back_for_float32():
14+
from vllm_fl.dispatch.backends.vendor.ascend.impl.rotary import (
15+
rotary_embedding_ascend,
16+
)
17+
1218
num_tokens = 4
1319
num_heads = 2
1420
head_size = 8

0 commit comments

Comments
 (0)