MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / profile_model_time

Method profile_model_time

deepspeed/inference/engine.py:193–200  ·  view source on GitHub ↗
(self, use_cuda_events=True)

Source from the content-addressed store, hash-verified

191 DeepSpeedTransformerInference.workspace = None
192
193 def profile_model_time(self, use_cuda_events=True):
194 if not self.model_profile_enabled and not self._config.enable_cuda_graph:
195 self.module.register_forward_pre_hook(self._pre_forward_hook)
196 self.module.register_forward_hook(self._post_forward_hook)
197 self.model_profile_enabled = True
198 self.use_cuda_events = use_cuda_events
199 if self.use_cuda_events:
200 self.timers = SynchronizedWallClockTimer()
201
202 # todo: remove this once all the config dicts are centralized from top level pydantic config
203 def _get_model_config_generate(self, config):

Callers 1

testMethod · 0.80

Calls 1

Tested by 1

testMethod · 0.64