pytorch/test/fx
Shangdi Yu bcddae14ec Enhance "from_node" node meta to track source recursively (#142066)
Summary:
Change the "from_node" node meta format to be able to track the provenance of nodes recursively.

The new "from_node" format is a a list node NodeSource:

```
class NodeSource:
	self.node_name: str
	self.target: str
	self.graph_id: int
	self.pass_name: str
	self.action: str
	self.from_node: List[NoedSource]
```

This is in preparation for the inductor provenance tracking. For background, the inductor provenance tracking doc: https://docs.google.com/document/d/1dGh9myqNhywmbfP0Quzx_f04bghDFlj8cawj8MopiO8/edit?fbclid=IwZXh0bgNhZW0CMTEAAR0jUQ0Tf4ROLDED8Y_eIzrU0KVZVdRmyIQLp-avt-kGRPI_VgYVNyjH_q0_aem_HCQ_pxHDiwOkO9mQyWB2-g&tab=t.0 (internal only),

Test Plan:
```
buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_unflatten_multiple_graphs_state
buck run mode/dev-nosan caffe2/test:fx -- -r node_source
```

Differential Revision: D66737916

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142066
Approved by: https://github.com/avikchaudhuri
2024-12-09 23:39:15 +00:00
..
named_tup.py
quantization.py
test_common_passes.py
test_cse_pass.py
test_dce_pass.py
test_future.py
test_fx_const_fold.py
test_fx_node_hook.py [export] Change fx graph _replace_hook to a list of Callable (#142006) 2024-12-05 03:26:48 +00:00
test_fx_param_shape_control_flow.py
test_fx_split.py
test_fx_traceback.py Enhance "from_node" node meta to track source recursively (#142066) 2024-12-09 23:39:15 +00:00
test_fx_xform_observer.py
test_gradual_type.py
test_lazy_graph_module.py
test_matcher_utils.py
test_partitioner_order.py
test_pass_infra.py
test_shape_inference.py
test_source_matcher_utils.py
test_subgraph_rewriter.py
test_z3_gradual_types.py