Files
pytorch/docs
Byron Wang 276a994ab3 Move non-tensor nodes on boundary after split (#163605)
Summary: See details in the attached doc
[AOTI Non-Tensor on Boundary Issue.pdf](https://github.com/user-attachments/files/22608882/AOTI.Non-Tensor.on.Boundary.Issue.pdf)

Meta internal post: https://fb.workplace.com/groups/aoti.productionization/permalink/743060011864813/

Test Plan: unit test

Bifferential Revision: D80903201

Steps to show how this feature works:
- checkout commit: 01eb5dd5c3dc3e5d62fc975da9bcfee4befbd421
- run this local lowering command: P2072906967
You will see error like below, this means there is a node on the boundary whose dtype is `torch.dtype`, the corresponding model code is [this line](https://www.internalfb.com/code/fbsource/[e9ae35402388]/fbcode/minimal_viable_ai/umia_v1/ig/omni/root_model.py?lines=2409)
```
Found <class 'torch.dtype'> in output, which is not a known type.
```
- Then search `move_non_tensor_nodes_on_boundary` in file `fbcode/caffe2/torch/fb/model_transform/lower_presets/aoti/ig_ss_t2i_retrieval_aot_inductor.py`, you will see it is commented, now set `move_non_tensor_nodes_on_boundary` to true, and rerun the command in last step, you will see the tracing is done and `_exported_run_on_acc_1_readable.txt` is generated. (although there is IMA error which is not related to this diff)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/163605
Approved by: https://github.com/ColinPeppler
2025-12-19 15:31:29 +00:00
..

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.