pytorch/torch/_decomp
lezcano b67e022833 Fix ref / decomposition index_add (#86266)
The decomposition of `index_add` was using `slice(None)`, when it should
use just `None`.

The reference for index_add was also wrong, as `x[idx] += t` does not
use atomic add, so it does not work when several `idx`s point to the
same location.

This PR adds extra reference inputs to help test for this.

Fixes https://github.com/pytorch/torchdynamo/issues/1356
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86266
Approved by: https://github.com/ngimel
2022-10-05 19:59:15 +00:00
..
__init__.py Unconditionally register Python decomps to Meta key in Python Dispatcher (#85750) 2022-10-03 22:49:25 +00:00
decompositions.py Fix ref / decomposition index_add (#86266) 2022-10-05 19:59:15 +00:00
decompositions_for_jvp.py [reland 2] Call jit decomp in VariableType to improve forward AD coverage (#84976) 2022-09-15 22:46:19 +00:00