Skip to content

Commit 0291fbf

Browse files
authored
[CI/Build] Fix amd model executor test (#27612)
Signed-off-by: zhewenli <[email protected]>
1 parent b46e4a0 commit 0291fbf

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.buildkite/test-amd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ steps:
561561

562562
- label: Model Executor Test # 23min
563563
timeout_in_minutes: 35
564-
mirror_hardwares: [amdexperimental]
564+
mirror_hardwares: [amdexperimental, amdproduction]
565565
agent_pool: mi325_1
566566
# grade: Blocking
567567
source_file_dependencies:

tests/model_executor/model_loader/fastsafetensors_loader/test_fastsafetensors_loader.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33

4+
import pytest
5+
46
from vllm import SamplingParams
7+
from vllm.platforms import current_platform
58

69
test_model = "openai-community/gpt2"
710

@@ -15,6 +18,9 @@
1518
sampling_params = SamplingParams(temperature=0.8, top_p=0.95, seed=0)
1619

1720

21+
@pytest.mark.skipif(
22+
not current_platform.is_cuda(), reason="fastsafetensors requires CUDA/NVIDIA GPUs"
23+
)
1824
def test_model_loader_download_files(vllm_runner):
1925
with vllm_runner(test_model, load_format="fastsafetensors") as llm:
2026
deserialized_outputs = llm.generate(prompts, sampling_params)

tests/model_executor/model_loader/fastsafetensors_loader/test_weight_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@
55
import tempfile
66

77
import huggingface_hub.constants
8+
import pytest
89
import torch
910

1011
from vllm.model_executor.model_loader.weight_utils import (
1112
download_weights_from_hf,
1213
fastsafetensors_weights_iterator,
1314
safetensors_weights_iterator,
1415
)
16+
from vllm.platforms import current_platform
1517

1618

19+
@pytest.mark.skipif(
20+
not current_platform.is_cuda(), reason="fastsafetensors requires CUDA/NVIDIA GPUs"
21+
)
1722
def test_fastsafetensors_model_loader():
1823
with tempfile.TemporaryDirectory() as tmpdir:
1924
huggingface_hub.constants.HF_HUB_OFFLINE = False

0 commit comments

Comments
 (0)