pytorch/test/cpp
kshitij12345 eb9b156019 [fix] MathBits: serialization (#88182)
Fixes #81690

TODO:

* [x] C++ Unpickler Fix (locally tested pickled in Python and unpickled in C++)
* [x] C++ Pickler Fix (locally tested pickled in C++ and unpickled in Python)
* [x] Do quant_tensor, sparse_tensor, etc require similar changes? (Sparse and Quant don't need this)
* [x] Add Comments
* [x] How to make sure C++ and Python are in sync? (Functions in `pickler.h` help in getting and setting Tensor Metadata (math-bits for now) on a tensor. They are the only place which should handle this.)

Notes:
Quant Tensor don't support complex dtypes and for float they segfault with `_neg_view` : https://github.com/pytorch/pytorch/issues/88484

Sparse Tensor:
```python
>>> a = torch.tensor([[0, 2.], [3j, 0]]).to_sparse()
>>> a.conj().is_conj()
False
>>> a._neg_view()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotImplementedError: Cannot access storage of SparseTensorImpl
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/88182
Approved by: https://github.com/ezyang, https://github.com/anjali411
2022-11-09 17:15:12 +00:00
..
api [fix] MathBits: serialization (#88182) 2022-11-09 17:15:12 +00:00
c10d Add reference counter in FileStore (#85601) 2022-10-07 17:59:29 +00:00
common
dist_autograd [lint] autoformat test/cpp and torch/csrc 2022-06-11 21:11:16 +00:00
jit [NVFuser] Upstream push 1026 (#87779) 2022-11-04 20:04:34 +00:00
lazy empty strided symint (#84830) 2022-09-15 04:09:43 +00:00
lite_interpreter_runtime [edge profiler] Add e2e test for profiler event and chrometrace (#87877) 2022-11-02 14:49:54 +00:00
monitor torch/monitor: merge Interval and FixedCount stats (#72009) 2022-01-30 23:21:59 +00:00
profiler Nested profiling support for Linux-perf Profiler (#87904) 2022-11-02 14:51:53 +00:00
rpc Refactor distribuetd to use absolute header path (#85780) 2022-09-30 05:13:50 +00:00
tensorexpr Fix the performance issue that the for-loop before ExternallCall could not be parallelized. (#85056) 2022-10-07 07:36:28 +00:00
__init__.py