[UX][Startup] Account for CUDA graphs during memory profiling (#30515)
This commit is contained in:
@@ -112,16 +112,25 @@ class UBatchWrapper:
|
||||
self.cudagraphs: dict[int, CUDAGraphMetaData] = {}
|
||||
|
||||
self.cudagraph_wrapper = None
|
||||
self.graph_pool = None
|
||||
if runtime_mode is not CUDAGraphMode.NONE:
|
||||
self.cudagraph_wrapper = CUDAGraphWrapper(
|
||||
runnable, vllm_config, runtime_mode=runtime_mode
|
||||
)
|
||||
self.graph_pool = current_platform.get_global_graph_pool()
|
||||
|
||||
self.sm_control = self._create_sm_control_context(vllm_config)
|
||||
self.device = device
|
||||
|
||||
@property
|
||||
def graph_pool(self):
|
||||
if self.cudagraph_wrapper is not None:
|
||||
return self.cudagraph_wrapper.graph_pool
|
||||
return None
|
||||
|
||||
def clear_graphs(self) -> None:
|
||||
self.cudagraphs.clear()
|
||||
if self.cudagraph_wrapper is not None:
|
||||
self.cudagraph_wrapper.clear_graphs()
|
||||
|
||||
@staticmethod
|
||||
def _create_sm_control_context(vllm_config: VllmConfig):
|
||||
comm_sms: int = envs.VLLM_DBO_COMM_SMS
|
||||
|
||||
Reference in New Issue
Block a user