load_profiler_result¶
- paddle.profiler. load_profiler_result ( filename: str ) [source]
-
Load dumped profiler data back to memory.
- Parameters
-
filename (str) – Name of the exported protobuf file of profiler data.
- Returns
-
ProfilerResult
object, which stores profiling data.
Examples
>>> >>> import paddle.profiler as profiler >>> import paddle >>> paddle.device.set_device('gpu') >>> with profiler.Profiler( ... targets=[profiler.ProfilerTarget.CPU, profiler.ProfilerTarget.GPU], ... scheduler = (3, 10)) as p: ... for iter in range(10): ... #train() ... p.step() >>> p.export('test_export_protobuf.pb', format='pb') >>> profiler_result = profiler.load_profiler_result('test_export_protobuf.pb')