Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 71fde94

Browse files
committed
add more registration step description
1 parent 7caba36 commit 71fde94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rfcs/20210513-pluggable-profiler-for-tensorflow.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ The table below summarizes all structures defined and the functionality they inv
6969
#### Registration
7070
Core TensorFlow will register a new ProfilerInterface with [ProfilerFactory](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/lib/profiler_factory.h#L29).
7171
1. Core TensorFlow loads the function `TF_InitProfiler` from the plugin's dynamic library installed under "…python_dir.../site-packages/tensorflow-plugins".
72-
2. Core TensorFlow populates `TF_ProfilerRegistrationParams` and passes it in a call to `TF_InitProfiler`. Core TensorFlow owns the memory of `TF_ProfilerRegistrationParams`'s `profiler` and `profiler_fns`.
72+
2. Core TensorFlow populates `TF_ProfilerRegistrationParams` and passes it in a call to `TF_InitProfiler`. Core TensorFlow owns the memory of `TF_ProfilerRegistrationParams`'s `profiler` and `profiler_fns` struct.
7373
* In `TF_InitProfiler`, the plugin populates `TF_ProfilerRegistrationParams`'s `profiler` and `profiler_fns`.
74-
3. Core Tensorflow will create a `PluggableProfiler` during [ProfilerSession](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/lib/profiler_session.cc#L109) setup.
74+
3. Core TensorFlow registers a profiler creation function to ProfilerFactory based on `profiler` and `profiler_fns` populated by the plugin during the initialization time.
75+
4. Core Tensorflow will create a `PluggableProfiler` during [ProfilerSession](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/lib/profiler_session.cc#L109) setup.
7576

7677
#### Protobuf class
7778
Profiler uses `XSpace` to store the performance data collected by backends. With this type of data structure, TensorFlow's profiler tools can generate various views of performance, such as timeline, memory consumption, performance of every TensorFlow op and set of summaries. `XSpace` is C++ object generated by protobuf toolchain with a predefined structure in [xplane.proto](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/protobuf/xplane.proto#L9).

0 commit comments

Comments
 (0)