pytorch/torch/nested
Joel Schlosser 1ba1b7b597 Support remaining *_like factory functions for NJT (#144889)
Fixes #144761

This PR adds NJT impls for those *_like functions that were previously missing:
* `full_like()`
* `rand_like()`
* `randint_like()`

It also fixes a bug in existing *_like functions when a new device is specified. Fix is to also transfer `offsets` / `lengths` to the new device.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144889
Approved by: https://github.com/soulitzer
2025-01-27 21:33:51 +00:00
..
_internal Support remaining *_like factory functions for NJT (#144889) 2025-01-27 21:33:51 +00:00
__init__.py Update OSS nested tensor docs to focus on NJT (#145402) 2025-01-25 04:08:19 +00:00