File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 44import pytest
55import torch
66from vllm .config .compilation import CUDAGraphMode
7+ from vllm .engine .arg_utils import EngineArgs
78from vllm .platforms import PlatformEnum
89
910from tests .ut .base import TestBase
@@ -722,3 +723,26 @@ def test_get_static_graph_wrapper_cls_returns_correct_value(self):
722723 self .platform .get_static_graph_wrapper_cls (),
723724 "vllm_ascend.compilation.acl_graph.ACLGraphWrapper" ,
724725 )
726+
727+ def test_aclgraph_enable (self ):
728+ config = EngineArgs ()
729+ VllmConfig = config .create_engine_config ()
730+ self .assertEqual (VllmConfig .compilation_config .cudagraph_mode ,
731+ CUDAGraphMode .PIECEWISE )
732+
733+ with self .assertLogs (logger = "vllm" , level = "INFO" ) as cm :
734+ from vllm_ascend import platform
735+
736+ importlib .reload (platform )
737+ self .platform .check_and_update_config (VllmConfig )
738+ self .assertTrue (
739+ "PIECEWISE compilation enabled on NPU. use_inductor not supported - "
740+ "using only ACL Graph mode" in cm .output [1 ])
741+ self .assertEqual (
742+ VllmConfig .compilation_config .level ,
743+ CompilationLevel .PIECEWISE ,
744+ )
745+ self .assertEqual (
746+ VllmConfig .compilation_config .cudagraph_mode ,
747+ CUDAGraphMode .PIECEWISE ,
748+ )
You can’t perform that action at this time.
0 commit comments