pytorch/test/cpp
Mikayla Gawarecki afaee00fec Add python nested_tensor and as_nested_tensor constructors in torch.nested (#85593)
Remove `torch.nested_tensor` which has erroneous behavior wrt gradients (could be either leaf or not leaf). Introduce `torch.nested.nested_tensor` and `torch.nested.as_nested_tensor` in the vein of `torch.tensor` and `torch.as_tensor`. Done in nested `__init__.py` for now but can move to pybind in future (when we want to load from numpy/nested lists ).

Discussed offline with @cpuhrsch and pybind constructor (https://github.com/pytorch/pytorch/pull/85536) was more gnarly than expected, so we can move to that when we do need loading from numpy etc.

Differential Revision: [D39806622](https://our.internmc.facebook.com/intern/diff/D39806622)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85593
Approved by: https://github.com/drisspg, https://github.com/cpuhrsch
2022-09-28 20:15:02 +00:00
..
api Add python nested_tensor and as_nested_tensor constructors in torch.nested (#85593) 2022-09-28 20:15:02 +00:00
c10d [2/N] [Dispatchable Collectives] Extract ProcessGroup::Work into a separate class and update references (#83680) 2022-09-14 13:05:58 +00:00
common
dist_autograd [lint] autoformat test/cpp and torch/csrc 2022-06-11 21:11:16 +00:00
jit [perf][1/5] Replace IValue::toString()->string() with IValue::toStringRef() (#85437) 2022-09-23 23:36:57 +00:00
lazy empty strided symint (#84830) 2022-09-15 04:09:43 +00:00
lite_interpreter_runtime Back out "Back out "[profiling] Adding targets file for test_mobile_profiler"" (#82243) 2022-07-28 23:08:52 +00:00
monitor torch/monitor: merge Interval and FixedCount stats (#72009) 2022-01-30 23:21:59 +00:00
profiler Add SOFT_ASSERT to gracefully recover from invariant violations (#82689) 2022-08-10 00:58:07 +00:00
rpc [lint] autoformat test/cpp and torch/csrc 2022-06-11 21:11:16 +00:00
tensorexpr Optimize to if the datatyep of the source tensor is as same as the dest datatype (#85140) 2022-09-27 04:40:42 +00:00
__init__.py