From d969c309abb72fcf61cee1d8e50dd92e5fbeaeab Mon Sep 17 00:00:00 2001 From: ronnywang Date: Fri, 2 Dec 2022 18:02:47 +0800 Subject: [PATCH] add custom profier doc (#48629) * add custom profier doc * update * format; test=document_fix Co-authored-by: Ligoml <39876205+Ligoml@users.noreply.github.com> --- python/paddle/profiler/profiler.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python/paddle/profiler/profiler.py b/python/paddle/profiler/profiler.py index eef6714f2e..e274f007b8 100644 --- a/python/paddle/profiler/profiler.py +++ b/python/paddle/profiler/profiler.py @@ -31,17 +31,14 @@ from paddle.fluid.core import ( enable_memory_recorder, enable_op_info_recorder, ) +from paddle.profiler import utils -from .utils import RecordEvent, wrap_optimizers from .profiler_statistic import ( + SortedKeys, StatisticData, _build_table, - SortedKeys, gen_layer_flops, ) -from paddle.profiler import utils - -from .profiler_statistic import SortedKeys, StatisticData, _build_table from .timer import benchmark from .utils import RecordEvent, wrap_optimizers @@ -359,6 +356,7 @@ class Profiler: be timed and profiled. Default: False. record_shapes (bool, optional): If it is True, collect op's input shape information. Default: False. profile_memory (bool, optional): If it is True, collect tensor memory allocation and release information. Default: False. + custom_device_types (list, optional): If targets contain profiler.ProfilerTarget.CUSTOM_DEVICE, custom_device_types select the custom device type for profiling. The default value represents all custom devices will be selected. with_flops (bool, optional): If it is True, the flops of the op will be calculated. Default: False. Examples: -- GitLab