[CI][Bugfix] Limit MRV2 sampler JIT warmup registration to ROCm (#58465)
Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5fcc6e7c73
commit
21ee743f47
@@ -55,6 +55,7 @@ from vllm.multimodal import MULTIMODAL_REGISTRY
|
|||||||
from vllm.multimodal.encoder_budget import (
|
from vllm.multimodal.encoder_budget import (
|
||||||
MultiModalBudget,
|
MultiModalBudget,
|
||||||
)
|
)
|
||||||
|
from vllm.platforms import current_platform
|
||||||
from vllm.sequence import IntermediateTensors
|
from vllm.sequence import IntermediateTensors
|
||||||
from vllm.tasks import SupportedTask
|
from vllm.tasks import SupportedTask
|
||||||
from vllm.utils.gc_utils import freeze_gc_for_cudagraph_capture
|
from vllm.utils.gc_utils import freeze_gc_for_cudagraph_capture
|
||||||
@@ -439,14 +440,15 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
|||||||
self.vllm_config, self.req_states, self.is_pooling_model, config_processors
|
self.vllm_config, self.req_states, self.is_pooling_model, config_processors
|
||||||
)
|
)
|
||||||
if self.is_last_pp_rank and not self.is_pooling_model:
|
if self.is_last_pp_rank and not self.is_pooling_model:
|
||||||
from vllm.v1.sample.ops.topk_topp_sampler import (
|
|
||||||
register_top_k_top_p_warmups,
|
|
||||||
)
|
|
||||||
|
|
||||||
# V2 bypasses TopKTopPSampler, which registers native warmups.
|
# V2 bypasses TopKTopPSampler, which registers native warmups.
|
||||||
# CUDA also needs these for its FlashInfer fallback paths.
|
# ROCm only: on CUDA these warmups add ~2 min to every engine start.
|
||||||
with self.jit_warmup_registry.activate():
|
if current_platform.is_rocm():
|
||||||
register_top_k_top_p_warmups()
|
from vllm.v1.sample.ops.topk_topp_sampler import (
|
||||||
|
register_top_k_top_p_warmups,
|
||||||
|
)
|
||||||
|
|
||||||
|
with self.jit_warmup_registry.activate():
|
||||||
|
register_top_k_top_p_warmups()
|
||||||
|
|
||||||
sampler_kwargs: dict[str, Any] = {
|
sampler_kwargs: dict[str, Any] = {
|
||||||
"vllm_config": self.vllm_config,
|
"vllm_config": self.vllm_config,
|
||||||
|
|||||||
Reference in New Issue
Block a user