Skip to content

Commit ac7971f

Browse files
Gasoonjiafacebook-github-bot
authored andcommitted
reformat inspector doc for better demo
Summary: as title Differential Revision: D85183062
1 parent 7bf27fe commit ac7971f

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

devtools/inspector/_inspector.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,10 +1036,8 @@ def __init__(
10361036
source_time_scale: The time scale of the performance data retrieved from the runtime. The default time hook implentation in the runtime returns NS.
10371037
target_time_scale: The target time scale to which the users want their performance data converted to. Defaults to MS.
10381038
debug_buffer_path: Debug buffer file path that contains the debug data referenced by ETDump for intermediate and program outputs.
1039-
delegate_metadata_parser: Optional function to parse delegate metadata from an Profiling Event. Expected signature of the function is:
1040-
(delegate_metadata_list: List[bytes]) -> Union[List[str], Dict[str, Any]]
1041-
delegate_time_scale_converter: Optional function to convert the time scale of delegate profiling data. If not given, use the conversion ratio of
1042-
target_time_scale/source_time_scale.
1039+
delegate_metadata_parser: Optional function to parse delegate metadata from an Profiling Event. Expected signature of the function is (delegate_metadata_list: List[bytes]) -> Union[List[str], Dict[str, Any]].
1040+
delegate_time_scale_converter: Optional function to convert the time scale of delegate profiling data. If not given, use the conversion ratio of target_time_scale/source_time_scale.
10431041
enable_module_hierarchy: Enable submodules in the operator graph. Defaults to False.
10441042
10451043
Returns:
@@ -1306,10 +1304,9 @@ def print_data_tabular(
13061304
Displays the underlying EventBlocks in a structured tabular format, with each row representing an Event.
13071305
13081306
Args:
1309-
file: Which IO stream to print to. Defaults to stdout.
1310-
Not used if this is in an IPython environment such as a Jupyter notebook.
1311-
include_units: Whether headers should include units (default true)
1312-
include_delegate_debug_data: Whether to include delegate debug metadata (default false)
1307+
file: Which IO stream to print to. Defaults to stdout. Not used if this is in an IPython environment such as a Jupyter notebook.
1308+
include_units: Whether headers should include units (default true).
1309+
include_delegate_debug_data: Whether to include delegate debug metadata (default false).
13131310
13141311
Returns:
13151312
None
@@ -1419,12 +1416,12 @@ def calculate_numeric_gap(
14191416
compare the intermediate outputs from the AOT and the runtime.
14201417
14211418
Args:
1422-
distance: the metrics the inspector will use for gap calculation. Should be one of "MSE", "L1" and "SNR".
1423-
disable_debug_handle_validation: Often when aten graph has symbolic shape nodes, and inbuilt ops like gt/lt etc.,
1424-
during re-export of such a graph 'from_node' information is lost from node.meta. As a result we loose connection
1425-
between edge IR nodes and aten nodes for such ops. By default we validate that every edge IR node has corresponding
1426-
node in aten IR, and when such validation fails numeric debugger falls back to edge IR as reference graph. This
1427-
flag allows one to override such behavior and make best effort comparison.
1419+
distance: The metrics the inspector will use for gap calculation. Should be one of "MSE", "L1" and "SNR".
1420+
disable_debug_handle_validation: Often when aten graph has symbolic shape nodes and inbuilt ops like gt/lt etc.,
1421+
during re-export of such a graph 'from_node' information is lost from node.meta. As a result we loose
1422+
connection between edge IR nodes and aten nodes for such ops. By default we validate that every edge IR
1423+
node has corresponding node in aten IR, and when such validation fails numeric debugger falls back to edge
1424+
IR as reference graph. This flag allows one to override such behavior and make best effort comparison.
14281425
14291426
Returns:
14301427
pd.DataFrame: A DataFrame listing corresponding operator intermediate outputs from both stages and their computed numerical gaps.

0 commit comments

Comments
 (0)