Mikayla Gawarecki
ec61951f07
Fix inaccuracy in nt constructor documentation + broken rendering ( #89152 )
...
Rendering was broken and docstring seemed to be inaccurate

Pull Request resolved: https://github.com/pytorch/pytorch/pull/89152
Approved by: https://github.com/cpuhrsch
2022-11-16 22:32:46 +00:00
Antoni Viros i Martin
c77368d416
Implement a constructor for nested_tensor that is similar to torch.tensor() ( #88213 )
...
Summary: This diff merges both previous implementations of constructors for nested tensors, the one from lists of tensors and the one with arbitrary python lists, adn implements it in pytorch core so no extensions are needed to construct NT.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88213
Approved by: https://github.com/cpuhrsch
2022-11-08 00:03:18 +00:00
Frankie Robertson
afc9963865
Fix path to nested_tensor in example ( #86891 )
...
This appears to be a typo.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86891
Approved by: https://github.com/H-Huang
2022-10-13 17:42:32 +00:00
Mikayla Gawarecki
a77f2a95a7
Improve NestedTensor documentation ( #85186 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85186
Approved by: https://github.com/cpuhrsch
2022-10-12 22:03:04 +00:00
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
Mikayla Gawarecki
e217b30b0f
Add torch.nested namespace ( #84102 )
...
First step towards #83775
- only `to_padded_tensor` is moved to the nested namespace for now
- following the schema used for `special`, `fft`, `linalg` and other namespaces, nested functions are registered in native_functions.yaml as `nested_{function_name}` and are bound to the desired Python name in
`torch/nested/__init__.py`, and the desired C++ name in `torch/csrc/api/include/torch/nested.h`.
~~**Question**: should we keep the documentation for `Tensor.to_padded_tensor` or can this deleted since it is shared by `torch.nested.to_padded_tensor`?~~
[generated nested docs](https://docs-preview.pytorch.org/84102/nested.html?highlight=nested#module-torch.nested )
Differential Revision: [D39361148](https://our.internmc.facebook.com/intern/diff/D39361148 )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84102
Approved by: https://github.com/drisspg
2022-09-12 16:31:05 +00:00
Christian Puhrsch
484c0de670
Minimal NestedTensor ( #72881 )
...
Summary:
This PR adds a minimal version of a NestedTensor. It introduces the general harness future development can be built around.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72881
Reviewed By: albanD
Differential Revision: D34259177
Pulled By: cpuhrsch
fbshipit-source-id: 0245c36f603424e20f3b09651043c207f526d760
(cherry picked from commit 10764e8d427f29b364567e4cbc86ed73c3933158)
2022-03-02 16:31:51 +00:00