需要看 How to add FakeTensor support (abstract impl; meta functions) 部分 https://docs.google.com/document/d/1_W62p8WJOQQUzPsJYa7s701JXt0qf2OfLub2sbkHOaU/edit
参考
- [Dynamo] Custom backend receives non FakeTensor example inputs · Issue #112506 · pytorch/pytorch · GitHub
- https://dev-discuss.pytorch.org/t/guide-getting-c-custom-ops-to-work-with-torch-compile/1737
- How to define an in-place custom op in dynamo? - torch.compile - PyTorch Forums
- Torch Dynamo allow_in_graph doesn't capture the custom function in graph · Issue #97295 · pytorch/pytorch · GitHub
- https://colab.research.google.com/drive/1Zh-Uo3TcTH8yYJF-LLo5rjlHVMtqvMdf#scrollTo=j2_AqCyoKSUj
- detectron2/tools/deploy at main · facebookresearch/detectron2 · GitHub