Skip to content

Commit 40790e0

Browse files
committed
fix amd Examples Test
Signed-off-by: Yida Wu <yida.wu@amd.com>
1 parent fcd5306 commit 40790e0

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.buildkite/test-amd.yaml

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

435435
- label: Examples Test # 30min
436436
timeout_in_minutes: 45
437-
mirror_hardwares: [amdexperimental]
437+
mirror_hardwares: [amdexperimental, amdproduction]
438438
agent_pool: mi325_1
439439
# grade: Blocking
440440
working_dir: "/vllm-workspace/examples"

examples/offline_inference/basic/embed.py

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

4+
import os
45
from argparse import Namespace
56

67
from vllm import LLM, EngineArgs
8+
from vllm.platforms import current_platform
79
from vllm.utils.argparse_utils import FlexibleArgumentParser
810

911

@@ -20,6 +22,8 @@ def parse_args():
2022

2123

2224
def main(args: Namespace):
25+
if current_platform.is_rocm():
26+
os.environ["VLLM_ATTENTION_BACKEND"] = "FLEX_ATTENTION"
2327
# Sample prompts.
2428
prompts = [
2529
"Hello, my name is",

examples/offline_inference/basic/score.py

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

4+
import os
45
from argparse import Namespace
56

67
from vllm import LLM, EngineArgs
8+
from vllm.platforms import current_platform
79
from vllm.utils.argparse_utils import FlexibleArgumentParser
810

911

@@ -20,6 +22,8 @@ def parse_args():
2022

2123

2224
def main(args: Namespace):
25+
if current_platform.is_rocm():
26+
os.environ["VLLM_ATTENTION_BACKEND"] = "FLEX_ATTENTION"
2327
# Sample prompts.
2428
text_1 = "What is the capital of France?"
2529
texts_2 = [

0 commit comments

Comments
 (0)