[refactor] Adopt get_parallel() everywhere and close out the parallel wrapper surface (#30492)
This commit is contained in:
+1
-5
@@ -555,15 +555,11 @@ def _capture_eagle_draft_extend_graph_runner(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.graph_capture",
|
||||
_single_rank_graph_capture,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_tensor_model_parallel_rank",
|
||||
lambda: 0,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_available_gpu_memory",
|
||||
lambda *args, **kwargs: 0.0,
|
||||
),
|
||||
get_parallel().override(attn_cp_size=1),
|
||||
get_parallel().override(attn_cp_size=1, tp_rank=0),
|
||||
):
|
||||
_reset_cuda_graph_test_buffers()
|
||||
return EAGLEDraftExtendCudaGraphRunner(
|
||||
|
||||
+2
-10
@@ -437,15 +437,11 @@ def _capture_eagle_draft_graph_runner(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.graph_capture",
|
||||
_single_rank_graph_capture,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_tensor_model_parallel_rank",
|
||||
lambda: 0,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_available_gpu_memory",
|
||||
lambda *args, **kwargs: 0.0,
|
||||
),
|
||||
get_parallel().override(attn_cp_size=1),
|
||||
get_parallel().override(attn_cp_size=1, tp_rank=0),
|
||||
):
|
||||
_reset_cuda_graph_test_buffers()
|
||||
return EAGLEDraftCudaGraphRunner(
|
||||
@@ -463,15 +459,11 @@ def _capture_frozen_kv_mtp_graph_runner(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.graph_capture",
|
||||
_single_rank_graph_capture,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_tensor_model_parallel_rank",
|
||||
lambda: 0,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.model_executor.runner.decode_cuda_graph_runner.get_available_gpu_memory",
|
||||
lambda *args, **kwargs: 0.0,
|
||||
),
|
||||
get_parallel().override(attn_cp_size=1),
|
||||
get_parallel().override(attn_cp_size=1, tp_rank=0),
|
||||
):
|
||||
_reset_cuda_graph_test_buffers()
|
||||
return FrozenKVMTPCudaGraphRunner(worker)
|
||||
|
||||
Reference in New Issue
Block a user