Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions devtools/inspector/_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,8 @@ def __init__(
source_time_scale: The time scale of the performance data retrieved from the runtime. The default time hook implentation in the runtime returns NS.
target_time_scale: The target time scale to which the users want their performance data converted to. Defaults to MS.
debug_buffer_path: Debug buffer file path that contains the debug data referenced by ETDump for intermediate and program outputs.
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]]
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.
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]].
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.
enable_module_hierarchy: Enable submodules in the operator graph. Defaults to False.

Returns:
Expand Down Expand Up @@ -1306,10 +1304,9 @@ def print_data_tabular(
Displays the underlying EventBlocks in a structured tabular format, with each row representing an Event.

Args:
file: Which IO stream to print to. Defaults to stdout.
Not used if this is in an IPython environment such as a Jupyter notebook.
include_units: Whether headers should include units (default true)
include_delegate_debug_data: Whether to include delegate debug metadata (default false)
file: Which IO stream to print to. Defaults to stdout. Not used if this is in an IPython environment such as a Jupyter notebook.
include_units: Whether headers should include units (default true).
include_delegate_debug_data: Whether to include delegate debug metadata (default false).

Returns:
None
Expand Down Expand Up @@ -1419,12 +1416,12 @@ def calculate_numeric_gap(
compare the intermediate outputs from the AOT and the runtime.

Args:
distance: the metrics the inspector will use for gap calculation. Should be one of "MSE", "L1" and "SNR".
disable_debug_handle_validation: Often when aten graph has symbolic shape nodes, and inbuilt ops like gt/lt etc.,
during re-export of such a graph 'from_node' information is lost from node.meta. As a result we loose connection
between edge IR nodes and aten nodes for such ops. By default we validate that every edge IR node has corresponding
node in aten IR, and when such validation fails numeric debugger falls back to edge IR as reference graph. This
flag allows one to override such behavior and make best effort comparison.
distance: The metrics the inspector will use for gap calculation. Should be one of "MSE", "L1" and "SNR".
disable_debug_handle_validation: Often when aten graph has symbolic shape nodes and inbuilt ops like gt/lt etc.,
during re-export of such a graph 'from_node' information is lost from node.meta. As a result we loose
connection between edge IR nodes and aten nodes for such ops. By default we validate that every edge IR
node has corresponding node in aten IR, and when such validation fails numeric debugger falls back to edge
IR as reference graph. This flag allows one to override such behavior and make best effort comparison.

Returns:
pd.DataFrame: A DataFrame listing corresponding operator intermediate outputs from both stages and their computed numerical gaps.
Expand Down
Loading