pytorch/test/cpp/lazy
Antonio Kim f3f327e103 Decouple LTC from TS Backend using Lazy IR Builder
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
2022-04-28 02:07:02 +00:00
..
CMakeLists.txt Adding integration of SSA into LazyTensor 2022-04-07 19:49:41 +00:00
test_backend_device.cpp Revert D35860266: [pytorch][PR] Update torch::lazy::BackendDevice to have a new default ordinal 2022-04-27 18:11:24 +00:00
test_cache.cpp Decouple Lazy Node Shape Cache (#75324) 2022-04-21 17:27:05 -07:00
test_ir.cpp Decouple Lazy Node Shape Cache (#75324) 2022-04-21 17:27:05 -07:00
test_ir_util.cpp Decouple Lazy Node Shape Cache (#75324) 2022-04-21 17:27:05 -07:00
test_lazy_ops.cpp E2E SymInt example narrow_copy 2022-04-26 02:40:27 +00:00
test_lazy_ops_util.cpp Decouple LTC from TS Backend using Lazy IR Builder 2022-04-28 02:07:02 +00:00
test_lazy_ops_util.h Add lazy tensor unit tests, disabled (#74309) 2022-03-17 15:31:26 +00:00
test_misc.cpp Run lazy tensor codegen in generate_code.py (#73996) 2022-03-17 15:31:26 +00:00
test_permutation_util.cpp
test_shape.cpp [LT] Remove torch::lazy::convertShapes (#71291) 2022-01-14 12:06:39 -08:00
test_symbolic_shape.cpp Decouple Lazy Node Shape Cache (#75324) 2022-04-21 17:27:05 -07:00
test_tensor_impl.cpp Land remaining parts of Torchscript Lazy Tensor backend (#74111) 2022-03-22 23:14:03 +00:00
test_util.cpp