Add opt-in CUDA-graph capture-trace export (#28551)
This commit is contained in:
@@ -101,6 +101,7 @@ from sglang.srt.utils import (
|
||||
require_mlp_sync,
|
||||
require_mlp_tp_gather,
|
||||
)
|
||||
from sglang.srt.utils.profile_utils import export_cuda_graph_capture_trace
|
||||
|
||||
try:
|
||||
from kt_kernel import KTMoEWrapper
|
||||
@@ -604,6 +605,16 @@ class DecodeCudaGraphRunner(BaseCudaGraphRunner):
|
||||
)
|
||||
logger.info(log_message)
|
||||
|
||||
# Optionally persist the shaped capture trace (record_shapes=True) for
|
||||
# offline per-kernel analysis -- opt-in via
|
||||
# SGLANG_ENABLE_CUDA_GRAPH_CAPTURE_TRACE; the in-log tables above are
|
||||
# unchanged.
|
||||
export_cuda_graph_capture_trace(
|
||||
prof_context,
|
||||
runner_name=type(self).__name__,
|
||||
tp_rank=get_tensor_model_parallel_rank(),
|
||||
)
|
||||
|
||||
def capture_prepare(
|
||||
self,
|
||||
size: int,
|
||||
|
||||
Reference in New Issue
Block a user