File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
examples/offline_inference/basic Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: Apache-2.0
22# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
4+ import os
45from argparse import Namespace
56
67from vllm import LLM , EngineArgs
8+ from vllm .platforms import current_platform
79from vllm .utils .argparse_utils import FlexibleArgumentParser
810
911
@@ -20,6 +22,8 @@ def parse_args():
2022
2123
2224def 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" ,
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: Apache-2.0
22# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
4+ import os
45from argparse import Namespace
56
67from vllm import LLM , EngineArgs
8+ from vllm .platforms import current_platform
79from vllm .utils .argparse_utils import FlexibleArgumentParser
810
911
@@ -20,6 +22,8 @@ def parse_args():
2022
2123
2224def 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 = [
You can’t perform that action at this time.
0 commit comments