torch-mlir/include/npcomp/Dialect/ATen/IR
Sean Silva 703428eff4 Add support for "trailing_" and "out" variants of various ops.
We already had the `promoteTrailingOutTensor` flag, but weren't using
it. A inplaceVariantKernelName flag needed to be added.

This change is a little dissatisfying, as the conversions done by the
RecognizeKernelsPass are currently non-orthogonal. In particular,
`kDropResultAndAliasArg0` probably won't work as intended if mixed with
these (we probably need to promote kDropResultAndAliasArg0 to not be an
arg-level thing anyway, as we have done with promoteTrailingOutTensor).

This involved adding a new op `numpy.overwrite_array`.

```
numpy.overwrite_array %arg2 overwrites %arg0 : tensor<2x3xf32>, !numpy.ndarray<[2,3]:f32>
```

This models the destructive update behavior. Note that in the above op,
we cannot simply RAUW %arg0 with a suitably conveted %arg2 (for example,
%arg0 might have uses that are not dominated by %arg2, or might have an
alias relation with some other array in the program). In general, we
need a pass analogous to "SSA-formation" which knows how to see through
these to uncover an underlying tensor program.

Also, add tanh_out_e2e.py/div_inplace_e2e.py and fix some bitrot in
refjit.py which is my running example I'm trying to get working.
2021-03-19 10:34:50 -07:00
..
.gitignore Add a number of kernels and new patterns. 2020-11-04 14:36:59 -08:00
ATenDialect.h Bump llvm-project to 444822d77a7fea28aa49edf24533c987efa1b2ee 2020-12-11 14:43:38 -08:00
ATenDialect.td Bump llvm-project to bc556e5685c0f97e79fb7b3c6f15cc5062db8e36 2021-01-08 14:18:09 -08:00
ATenOpInterface.td NFC: Re-organize ATen directory structure and fix warnings. 2020-10-22 14:13:26 -07:00
ATenOpInterfaces.h NFC: Re-organize ATen directory structure and fix warnings. 2020-10-22 14:13:26 -07:00
ATenOpStatisticsUtils.h Bump llvm-project to 444822d77a7fea28aa49edf24533c987efa1b2ee 2020-12-11 14:43:38 -08:00
ATenOps.td Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
CMakeLists.txt NFC: Re-organize ATen directory structure and fix warnings. 2020-10-22 14:13:26 -07:00
GeneratedATenOps.cpp.inc Add support for "trailing_" and "out" variants of various ops. 2021-03-19 10:34:50 -07:00
GeneratedATenOps.td Generate Conv2d definition. 2021-03-16 12:39:28 -07:00
LegacyGeneratedATenOps.td Add aten.mm op and "test" it e2e. 2020-11-20 17:21:24 -08:00