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

Function get_profiles

tensorflow/python/profiler/pprof_profiler.py:389–402  ·  view source on GitHub ↗

Generate profiles in pprof format. See https://github.com/google/pprof/blob/master/proto/profile.proto for pprof proto format. Args: graph: A `Graph` object. run_metadata: A `RunMetadata` proto. Returns: A dictionary mapping from device name to pprof proto for that device.

(graph, run_metadata)

Source from the content-addressed store, hash-verified

387
388
389def get_profiles(graph, run_metadata):
390 """Generate profiles in pprof format.
391
392 See https://github.com/google/pprof/blob/master/proto/profile.proto
393 for pprof proto format.
394
395 Args:
396 graph: A `Graph` object.
397 run_metadata: A `RunMetadata` proto.
398
399 Returns:
400 A dictionary mapping from device name to pprof proto for that device.
401 """
402 return PprofProfiler(graph, run_metadata).profile()
403
404
405def profile(graph, run_metadata, output_dir=None):

Callers 1

profileFunction · 0.85

Calls 2

PprofProfilerClass · 0.85
profileMethod · 0.80

Tested by

no test coverage detected