MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / start

Function start

tensorflow/python/eager/profiler.py:64–80  ·  view source on GitHub ↗

Start profiling. Raises: ProfilerAlreadyRunningError: If another profiling session is running.

()

Source from the content-addressed store, hash-verified

62
63
64def start():
65 """Start profiling.
66
67 Raises:
68 ProfilerAlreadyRunningError: If another profiling session is running.
69 """
70 global _profiler
71 with _profiler_lock:
72 if _profiler is not None:
73 raise ProfilerAlreadyRunningError('Another profiler is running.')
74 if context.default_execution_mode == context.EAGER_MODE:
75 context.ensure_initialized()
76 _profiler = pywrap_tensorflow.TFE_NewProfiler()
77 if not pywrap_tensorflow.TFE_ProfilerIsOk(_profiler):
78 logging.warning('Another profiler session is running which is probably '
79 'created by profiler server. Please avoid using profiler '
80 'server and profiler APIs at the same time.')
81
82
83def stop():

Callers 8

__enter__Method · 0.85
bfloat16.ccFile · 0.85
ToStringMethod · 0.85
bfloat16.ccFile · 0.85
IntersectMethod · 0.85
ComputeRelativeMethod · 0.85
UpdateToCoverMethod · 0.85
endMethod · 0.85

Calls 2

ensure_initializedMethod · 0.80

Tested by

no test coverage detected