mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Next stage of breaking up https://github.com/pytorch/pytorch/pull/74710 IR builder class introduced to decouple the explicit usage of `TsNode` in core lazy tensors. Requires https://github.com/pytorch/pytorch/pull/75324 to be merged in first. **Background** - there are ~ 5 special ops used in lazy core but defined as :public {Backend}Node. (DeviceData, Expand, Scalar...) - we currently require all nodes derive from {Backend}Node, so that backends can make this assumption safely - it is hard to have shared 'IR classes' in core/ because they depend on 'Node' **Motivation** 1. avoid copy-paste of "special" node classes for each backend 2. in general decouple and remove all dependencies that LTC has on the TS backend **Summary of changes** - new 'IRBuilder' interface that knows how to make 5 special ops - move 'special' node classes to `ts_backend/` - implement TSIRBuilder that makes the special TS Nodes - new backend interface API to get the IRBuilder - update core code to call the builder CC: @wconstab @JackCaoG @henrytwo Partially Fixes #74628 Pull Request resolved: https://github.com/pytorch/pytorch/pull/75433 Approved by: https://github.com/wconstab |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| test_backend_device.cpp | ||
| test_cache.cpp | ||
| test_ir.cpp | ||
| test_ir_util.cpp | ||
| test_lazy_ops.cpp | ||
| test_lazy_ops_util.cpp | ||
| test_lazy_ops_util.h | ||
| test_misc.cpp | ||
| test_permutation_util.cpp | ||
| test_shape.cpp | ||
| test_symbolic_shape.cpp | ||
| test_tensor_impl.cpp | ||
| test_util.cpp | ||