From 81d3c3ce77120b30e62eb7960aa5c65cf972d8ec Mon Sep 17 00:00:00 2001 From: Raiden Makoto <81530826+Raiden-Makoto@users.noreply.github.com> Date: Fri, 26 Jun 2026 23:29:19 -0700 Subject: [PATCH] [AMD] [GLM5] Guard cuda_runtime.h for ROCm in fused_metadata_copy (#29373) Co-authored-by: Raiden-Makoto --- .../jit_kernel/csrc/elementwise/fused_metadata_copy.cuh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh b/python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh index 7e1f91dcf..1758c38da 100644 --- a/python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh +++ b/python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh @@ -35,7 +35,11 @@ #include #include // for std::min +#ifndef USE_ROCM #include +#else +#include +#endif // Forward mode enum (must match Python ForwardMode in sglang/srt/layers/attention/dsa_backend.py) enum ForwardModeEnum { DECODE = 0, TARGET_VERIFY = 1, DRAFT_EXTEND = 2 };