[ROCm] Auto-enable breakable CUDA graphs for DeepseekV41ForCausalLM (#56349)
Signed-off-by: Markus Hartikainen <markus.hartikainen@amd.com> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
co-authored by
Jee Jee Li
parent
c2ea9f1a5f
commit
c711f740b7
@@ -358,6 +358,10 @@ def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch):
|
|||||||
assert "DeepseekV32ForCausalLM" not in breakable_architectures
|
assert "DeepseekV32ForCausalLM" not in breakable_architectures
|
||||||
assert "DeepseekV32MTPModel" not in breakable_architectures
|
assert "DeepseekV32MTPModel" not in breakable_architectures
|
||||||
assert "GlmMoeDsaForCausalLM" not in breakable_architectures
|
assert "GlmMoeDsaForCausalLM" not in breakable_architectures
|
||||||
|
# V4.1 cannot torch.compile and the ROCm sparse SWA backend only
|
||||||
|
# supports uniform-batch CUDA graphs, so it must opt in or the
|
||||||
|
# default FULL_AND_PIECEWISE serve path cannot start.
|
||||||
|
assert "DeepseekV41ForCausalLM" in breakable_architectures
|
||||||
|
|
||||||
# The carve-out takes effect via the runner-selection property
|
# The carve-out takes effect via the runner-selection property
|
||||||
# (warning_once args must be hashable for its lru_cache).
|
# (warning_once args must be hashable for its lru_cache).
|
||||||
|
|||||||
+10
-3
@@ -110,10 +110,17 @@ def default_breakable_cudagraph_architectures() -> frozenset[str]:
|
|||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
|
||||||
if current_platform.is_rocm():
|
if current_platform.is_rocm():
|
||||||
# Breakable CUDA graphs currently regress performance on ROCm, so no
|
# Breakable CUDA graphs currently regress performance on ROCm for
|
||||||
# architecture opts in by default here. Users can still force it with
|
# models that can use torch.compile piecewise graphs instead. Do not
|
||||||
|
# opt those in by default. Users can still force them with
|
||||||
# VLLM_USE_BREAKABLE_CUDAGRAPH=1.
|
# VLLM_USE_BREAKABLE_CUDAGRAPH=1.
|
||||||
return frozenset()
|
#
|
||||||
|
# DeepseekV41ForCausalLM cannot torch.compile, and the ROCm sparse
|
||||||
|
# SWA backend only reports AttentionCGSupport.UNIFORM_BATCH. Default
|
||||||
|
# FULL_AND_PIECEWISE then dies at capture unless breakable CUDA
|
||||||
|
# graphs are on. Enable this architecture so the published AMD
|
||||||
|
# recipe can start.
|
||||||
|
return frozenset({"DeepseekV41ForCausalLM"})
|
||||||
return DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES
|
return DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user