pytorch/test/fx
Shangdi Yu a4e4368157 add node mapping processing (#146103)
Summary:
Add `node_mapping = create_node_mapping(pre_grad_graph_id, inductor_post_to_pre_grad_nodes, debug_info)`, to produce a `inductor_provenance_tracking_node_mappings.json` file. This file will be used by the provenance tracking highlighter tool to create provenance visualization.

`inductor_triton_kernel_to_post_grad_nodes.json` and `inductor_provenance_tracking_node_mappings.json` files are not dumped if they are both empty. So it's removed from some of the `test_structured_trace` tests.

Test Plan:
CI
```
buck run mode/dev-nosan  fbcode//caffe2/test:fx -- -r graph_provenance

buck run mode/dev-nosan fbcode//caffe2/test/inductor:provenance_tracing

python test/dynamo/test_structured_trace.py
```

Differential Revision: D68190173

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146103
Approved by: https://github.com/chenyang78
2025-02-01 08:29:29 +00:00
..
named_tup.py
quantization.py
test_common_passes.py
test_cse_pass.py
test_dce_pass.py setitem node shouldn't be deadcode eliminated (#145714) 2025-01-27 15:08:21 +00:00
test_future.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_fx_const_fold.py
test_fx_node_hook.py
test_fx_param_shape_control_flow.py
test_fx_split.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_fx_traceback.py add node mapping processing (#146103) 2025-02-01 08:29:29 +00:00
test_fx_xform_observer.py [Inductor] [bc-breaking] Node Level provenance tracking (#144277) 2025-01-09 22:06:51 +00:00
test_gradual_type.py
test_graph_pickler.py pickler for GraphModule (#141659) 2025-01-31 05:34:28 +00:00
test_lazy_graph_module.py
test_matcher_utils.py
test_partitioner_order.py [4/N] Apply py39 ruff and pyupgrade fixes (#143257) 2025-01-04 10:47:51 +00:00
test_pass_infra.py
test_shape_inference.py
test_source_matcher_utils.py [dynamo][builtin-skiplist-cleanup] Remove weakref (#145744) 2025-01-28 07:55:12 +00:00
test_subgraph_rewriter.py
test_z3_gradual_types.py