Re-disable CUDA graph memory profiling on ROCm (#48440)

Signed-off-by: Rohan Potdar <rohan.potdar@amd.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Rohan Potdar committed Jul 12, 2026 at 23:59 UTC d973cce3ca809b44e0794ee044519e8ba91502e1
1 file changed +5 -7
vllm/v1/worker/gpu_worker.py
+5 -7
@@ -492,14 +492,11 @@ class Worker(WorkerBase):
492 )
493
494 # Profile CUDA graph memory if graphs will be captured.
495 - # ROCm is included: #44825 moved the profiler to
496 - # torch.accelerator.get_memory_info (reliable on ROCm, as used by
497 - # the AMD-CI mem tests), and graph_pool_handle resolves to the same
498 - # torch.cuda handle the live capture path already uses on ROCm.
499 - # XPU stays excluded (see #39977).
495 + # Skip on ROCm/HIP/XPU as graph pool handles and get_memory_info
496 + # behave differently and can produce incorrect/negative estimates.
497 cudagraph_memory_estimate = 0
498 if (
502 - current_platform.is_cuda_alike()
499 + current_platform.is_cuda()
500 and self.vllm_config.compilation_config.cudagraph_mode
501 != CUDAGraphMode.NONE
502 ):
@@ -515,7 +512,8 @@ class Worker(WorkerBase):
512 + profile_result.weights_memory
513 )
514
518 - # Respect the opt-in flag as originally designed.
515 + # On ROCm, cudagraph_memory_estimate is always 0 so this is a no-op.
516 + # On CUDA, respect the opt-in flag as originally designed.
517 cudagraph_memory_estimate_applied = (
518 cudagraph_memory_estimate
519 if envs.VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS