- [864](https://github.com/helmholtz-analytics/heat/pull/864) Dependencies: constrain `torchvision` version range to match supported `pytorch` version range.
Highlights
- Slicing/indexing overhaul for a more NumPy-like user experience. Warning for distributed arrays: [breaking change!](breaking-changes) Indexing one element along the distribution axis now implies the indexed element is communicated to all processes.
- More flexibility in handling non-load-balanced distributed arrays.
- More distributed operations, incl. [meshgrid](https://github.com/helmholtz-analytics/heat/pull/794).
Breaking Changes
- [758](https://github.com/helmholtz-analytics/heat/pull/758) Indexing a distributed `DNDarray` along the `DNDarray.split` dimension now returns a non-distributed `DNDarray`, i.e. the indexed element is MPI-broadcasted.
Example on 2 processes:
python
a = ht.arange(5 * 5, split=0).reshape((5, 5))
print(a.larray)
>>> [0] tensor([[ 0, 1, 2, 3, 4],
>>> [0] [ 5, 6, 7, 8, 9],
>>> [0] [10, 11, 12, 13, 14]], dtype=torch.int32)
>>> [1] tensor([[15, 16, 17, 18, 19],
>>> [1] [20, 21, 22, 23, 24]], dtype=torch.int32)
b = a[:, 2]
print(b.larray)
>>> [0] tensor([ 2, 7, 12], dtype=torch.int32)
>>> [1] tensor([17, 22], dtype=torch.int32)
print(b.shape)
>>> [0] (5,)
>>> [1] (5,)
print(b.split)
>>> [0] 0
>>> [1] 0
c = a[4]
print(c.larray)
>>> [0] tensor([20, 21, 22, 23, 24], dtype=torch.int32)
>>> [1] tensor([20, 21, 22, 23, 24], dtype=torch.int32)
print(c.shape)
>>> [0] (5,)
>>> [1] (5,)
print(c.split)
>>> [0] None
>>> [1] None
Bug Fixes
- [758](https://github.com/helmholtz-analytics/heat/pull/758) Fix indexing inconsistencies in `DNDarray.__getitem__()`
- [768](https://github.com/helmholtz-analytics/heat/pull/768) Fixed an issue where `deg2rad` and `rad2deg`are not working with the 'out' parameter.
- [785](https://github.com/helmholtz-analytics/heat/pull/785) Removed `storage_offset` when finding the mpi buffer (`communication. MPICommunication.as_mpi_memory()`).
- [785](https://github.com/helmholtz-analytics/heat/pull/785) added allowance for 1 dimensional non-contiguous local tensors in `communication. MPICommunication.mpi_type_and_elements_of()`
- [787](https://github.com/helmholtz-analytics/heat/pull/787) Fixed an issue where Heat cannot be imported when some optional dependencies are not available.
- [790](https://github.com/helmholtz-analytics/heat/pull/790) catch incorrect device after `bcast` in `DNDarray.__getitem__`
- [796](https://github.com/helmholtz-analytics/heat/pull/796) `heat.reshape(a, shape, new_split)` now always returns a distributed `DNDarray` if `new_split is not None` (inlcuding when the original input `a` is not distributed)
- [811](https://github.com/helmholtz-analytics/heat/pull/811) Fixed memory leak in `DNDarray.larray`
- [820](https://github.com/helmholtz-analytics/heat/pull/820) `randn` values are pushed away from 0 by the minimum value the given dtype before being transformed into the Gaussian shape
- [821](https://github.com/helmholtz-analytics/heat/pull/821) Fixed `__getitem__` handling of distributed `DNDarray` key element
- [831](https://github.com/helmholtz-analytics/heat/pull/831) `__getitem__` handling of `array-like` 1-element key
Feature additions
Exponential
- [812](https://github.com/helmholtz-analytics/heat/pull/712) New feature: `logaddexp`, `logaddexp2`
Linear Algebra
- [718](https://github.com/helmholtz-analytics/heat/pull/718) New feature: `trace()`
- [768](https://github.com/helmholtz-analytics/heat/pull/768) New feature: unary positive and negative operations
- [820](https://github.com/helmholtz-analytics/heat/pull/820) `dot` can handle matrix-vector operation now
Manipulations
- [796](https://github.com/helmholtz-analytics/heat/pull/796) `DNDarray.reshape(shape)`: method now allows shape elements to be passed in as single arguments.
Trigonometrics / Arithmetic
- [806](https://github.com/helmholtz-analytics/heat/pull/809) New feature: `square`
- [809](https://github.com/helmholtz-analytics/heat/pull/809) New feature: `acosh`, `asinh`, `atanh`
Misc.
- [761](https://github.com/helmholtz-analytics/heat/pull/761) New feature: `result_type`
- [788](https://github.com/helmholtz-analytics/heat/pull/788) Added the partition interface `DNDarray` for use with DPPY
- [794](https://github.com/helmholtz-analytics/heat/pull/794) New feature: `meshgrid`
- [821](https://github.com/helmholtz-analytics/heat/pull/821) Enhancement: it is no longer necessary to load-balance an imbalanced `DNDarray` before gathering it onto all processes. In short: `ht.resplit(array, None)` now works on imbalanced arrays as well.