diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 5a0d03464..05ef12de9 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -4409,6 +4409,16 @@ class ServerArgs: run_post_process_pass(self, _deepseek_moe_quant_resolution) if is_hip(): + if is_deepseek_dsa(hf_config): + # The fused top-k v2 kernel (topk_transform_512_v2) is a + # CUDA/Hopper-only path: its JIT source includes + # and uses cg::this_cluster() + # (thread-block clusters), neither of which exists on ROCm, + # so it fails to JIT-compile on gfx9xx during CUDA-graph + # capture. DeepSeek-V4 already disables it on HIP; mirror that + # here for the rest of the DSA family (DeepSeek-V3.2 / + # GLM-5.x) that shares the same decode top-k path. + envs.SGLANG_OPT_USE_TOPK_V2.set(False) if not self._resolved().enable_dp_attention and self.nnodes == 1: # TODO (Hubert): Put this back later # self.enable_aiter_allreduce_fusion = True