[7/N] torch.compile, reduce compilation time (#10460)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@ -79,7 +79,7 @@ def test_simple_piecewise_compile():
|
||||
vllm_config = VllmConfig(compilation_config=CompilationConfig(
|
||||
level=CompilationLevel.PIECEWISE,
|
||||
use_cudagraph=True,
|
||||
non_cudagraph_ops=["silly.attention"],
|
||||
splitting_ops=["silly.attention"],
|
||||
cudagraph_copy_inputs=True,
|
||||
))
|
||||
with set_current_vllm_config(vllm_config):
|
||||
|
||||
@ -258,7 +258,7 @@ def run_model(llama_config,
|
||||
use_cudagraph=True,
|
||||
)
|
||||
if split_attn:
|
||||
compilation_config.non_cudagraph_ops = ["silly.attention"]
|
||||
compilation_config.splitting_ops = ["silly.attention"]
|
||||
else:
|
||||
compilation_config = CompilationConfig(
|
||||
level=CompilationLevel.NO_COMPILATION, )
|
||||
@ -378,7 +378,7 @@ def benchmark():
|
||||
compilation_config = CompilationConfig(
|
||||
level=CompilationLevel.PIECEWISE,
|
||||
use_cudagraph=True,
|
||||
non_cudagraph_ops=["silly.attention"],
|
||||
splitting_ops=["silly.attention"],
|
||||
)
|
||||
else:
|
||||
compilation_config = CompilationConfig(
|
||||
|
||||
Reference in New Issue
Block a user