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

Function _build_advisor_options

tensorflow/python/profiler/model_analyzer.py:106–122  ·  view source on GitHub ↗

Build tfprof.AdvisorOptionsProto. Args: options: A dictionary of options. See ALL_ADVICE example. Returns: tfprof.AdvisorOptionsProto.

(options)

Source from the content-addressed store, hash-verified

104
105
106def _build_advisor_options(options):
107 """Build tfprof.AdvisorOptionsProto.
108
109 Args:
110 options: A dictionary of options. See ALL_ADVICE example.
111 Returns:
112 tfprof.AdvisorOptionsProto.
113 """
114 opts = tfprof_options_pb2.AdvisorOptionsProto()
115 if options is None:
116 return opts
117 for checker, checker_opts in six.iteritems(options):
118 checker_ops_pb = tfprof_options_pb2.AdvisorOptionsProto.CheckerOption()
119 for k, v in six.iteritems(checker_opts):
120 checker_ops_pb[k] = v
121 opts.checkers[checker].MergeFrom(checker_ops_pb)
122 return opts
123
124
125@tf_export(v1=['profiler.Profiler'])

Callers 2

adviseMethod · 0.85
adviseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected