MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / __init__

Method __init__

lightx2v/utils/profiler.py:157–162  ·  view source on GitHub ↗
(self, name=None)

Source from the content-addressed store, hash-verified

155 if not self._skip_sync:
156 torch_device_module.synchronize()
157 total_elapsed = time.perf_counter() - self.start_time
158 memory_suffix = self._end_memory_profile()
159 excluded = _get_excluded_time_stack().pop()
160 elapsed = total_elapsed - excluded
161 if self.enable_recorder and self.metrics_func:
162 if self.metrics_labels:
163 self.metrics_func.labels(*self.metrics_labels).observe(elapsed)
164 else:
165 self.metrics_func.observe(elapsed)

Callers

nothing calls this directly

Calls 1

is_initializedMethod · 0.80

Tested by

no test coverage detected