Skip to content

Commit 377f474

Browse files
authored
Update the comments of calculate_numeric_gap
Differential Revision: D80210646 Pull Request resolved: #13389
1 parent 30a6f5e commit 377f474

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

devtools/inspector/_inspector.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,14 +1170,18 @@ def _get_aot_intermediate_outputs_and_op_names(
11701170

11711171
export_program = None
11721172

1173-
# Will use the exported program to extract intermediate output if and only if exported_program has been provided, and it is the greatest ancestor of the edge_dialect_program
1173+
# Will use the exported program to extract intermediate output if and only if exported_program has been provided, and it is one of the ancestors of the edge_dialect_program
11741174
if self._etrecord.exported_program and propagate_back_debug_handle(
11751175
self._etrecord.exported_program,
11761176
self._etrecord.export_graph_id,
11771177
self._etrecord.edge_dialect_program,
11781178
):
11791179
export_program = self._etrecord.exported_program
11801180
else:
1181+
log.warning(
1182+
"Either aten dialect exported program is not in ETRecord, or it is not one of the ancestors of current edge dialect program."
1183+
"Will fall back to use edge dialect program to extract intermediate output",
1184+
)
11811185
export_program = self._etrecord.edge_dialect_program
11821186
graph_module = export_program.module()
11831187
aot_debug_handle_to_op_name = get_aot_debug_handle_to_op_name_mapping(
@@ -1392,7 +1396,9 @@ def calculate_numeric_gap(self, distance: str = "MSE"):
13921396
"""
13931397
Compares logged intermediate outputs from the exported graph (in ETRecord)
13941398
with runtime outputs (in ETDump) using a user-specific numerical comparator.
1395-
To use this function, you must first generate the ETRecord using the `bundle_program`,
1399+
If the exported graph is not supported, the function will fall back to use edge dialect graph.
1400+
1401+
To use this function, you must first generate the ETRecord with representative inputs,
13961402
and then create the Inspector instance with the ETRecord and ETDump. The Inspector can then
13971403
compare the intermediate outputs from the AOT and the runtime.
13981404

0 commit comments

Comments
 (0)