Prashant Kumar
6777a9484d
[LINALG] Add lowering for the aten.upsample_nearest2d op.
2022-10-04 17:20:29 +05:30
Vivek Khandelwal
9dd5ae8239
[tosa] Add TorchToTosa lowering for aten.arange.start_step op ( #1442 )
2022-09-30 07:33:41 -07:00
AmosLewis
940959589b
[MLIR][TORCH] Add Byte and Char Dtype support
2022-09-30 13:19:31 +05:30
Vivek Khandelwal
6db513c51d
[tosa] Add support for some cases of aten.broadcast_to op ( #1429 )
...
This commit adds support for TorchToTosa lowering of
`aten.broadcast_to` op for cases:
1.) When the rank of input and output tensor is equal.
2.) When the rank of input tensor is zero.
Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-09-29 09:40:56 -07:00
Vivek Khandelwal
bce00c8ed1
[tosa] Fix torch.vtensor.literal lowering
...
Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-09-29 17:03:10 +05:30
JakopinA
8ef0c874c2
Implement Expand/Collapse Functionality for Aten.View ( #1353 )
2022-09-27 11:08:14 -07:00
Eric Kunze
cb1b8796a2
Convert torch si literals into signless for TOSA ( #1421 )
2022-09-26 16:54:27 -07:00
Ashay Rane
a60acf272d
build: update llvm tag to bebc9695 ( #1415 )
...
Summary of changes:
- Renamed OptionalArrayRefParameter since the name conflicts with an
upstream symbol that has a different meaning
(https://reviews.llvm.org/D133819 )
- Removed extraneous dependency between TorchMLIRTorchToMhlo and
ChloOps, since the existing dependency on MhloDialect is sufficient
- Fixed code to prevent warnings related to comparisons between signed
and unsigned values
2022-09-26 11:44:54 -05:00
武家伟
ab7aa01b1e
[MHLO] Add torch-to-mhlo e2e support for aten.gather op ( #1410 )
...
* Add torch-to-mhlo e2e support for aten.gather op
* Add more e2e tests for torch.aten.gather op
2022-09-25 22:07:46 +08:00
Quinn Dawkins
53bf09ceef
Fix iterator types for embedding bag sum mode ( #1371 )
2022-09-23 13:13:47 -04:00
Tanyo Kwok
16dd7e2e5f
Fix dynamic shapes type verifications ( #1409 )
...
* Fix dynamic shapes type verifications
2022-09-23 20:50:29 +08:00
Tanyo Kwok
72e422b589
Add relu6 and binary broadcasts ( #1408 )
...
* Add relu6 and binary broadcasts
2022-09-23 20:39:15 +08:00
Tanyo Kwok
061a97c3f2
Replace empty_like && empty_memory_format with full/full_like ( #1398 )
...
* Replace empty_like && empty_memory_format with full/full_like
* fix broadcast rank0 tensor
2022-09-23 10:24:36 +08:00
Vivek Khandelwal
4ef6e69ed4
[MLIR][TORCH] Add TorchToTosa lowering for aten.clone op ( #1388 )
...
Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
Co-authored-by: Suraj Sudhir <16977902+sjarus@users.noreply.github.com>
2022-09-20 15:07:46 -07:00
Vivek Khandelwal
1ffd42bbde
[MLIR][TORCH] Add TorchToTosa lowering for aten.broadcast_to op ( #1386 )
...
Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-09-20 10:04:51 -07:00
武家伟
0e2e94d542
Add torch-to-mhlo e2e support for AtenArangeStartStepOp ( #1385 )
...
Co-authored-by: Vremold <xremold@gamil.com>
2022-09-20 22:31:24 +08:00
long.chen
797feaf129
[torch-mlir][Tosa] fix during torch.max.dim lower to tosa the reshape's new shape attr mismatch reshape's result type ( #1378 )
2022-09-16 21:29:56 -07:00
武家伟
b316918947
Add AtenClampOp conversion pattern to MHLO ( #1356 )
...
Add AtenClampOp conversion pattern to MHLO
2022-09-16 15:09:21 +08:00
George Petterson
a12b9c4492
Add lowering for aten::cumsum
2022-09-12 09:28:07 +05:30
Vivek Khandelwal
e35741fb1d
[MLIR][TORCH] Add E2E support for aten.bitwise_not op
...
This commit adds lowering of `aten.bitwise_not` op.
Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2022-09-08 17:52:12 +05:30
Vivek Khandelwal
c19fccfca2
[MLIR][TORCH] Add E2E support for aten.pow.Tensor_Tensor op
...
This commit adds lowering of `aten.pow.Tensor_Tensor` op.
Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2022-09-08 10:01:42 +05:30
武家伟
6a1893a517
[MLIR][MHLO] Add AtenFrobeniusNormDimOp and add its conversion pattern to MHLO and linalg ( #1306 )
...
* Add aten.frobenius_norm.dim op and init its conversion pattern to linalg and MHLO,
* run symbolic-shape-optimization before hlo-legalize-to-linalg to fit more mhlo e2e tests.
2022-09-08 10:15:36 +08:00
Ashay Rane
93f7c0ceb5
build: update llvm tag to d2613d5b ( #1343 )
...
Summary of changes:
- Update the dataflow analysis in RefineTypes.cpp
- Add tosa-to-arith pass after tosa-to-linalg pass, since
tosa-to-linalg (and canonicalizations) can produce tosa.const() ops
- Fixed warning about not making `matchAndRewrite` as override
2022-09-07 14:35:14 -05:00
Gaurav Shukla
99093d0623
[TORCH] Add decomposition of `aten.linear` op
...
This commit adds decomposition of `aten.linear` op. Due to limited
support at tosa backend in case of dynamic dimensions, this
decomposition is currently disabled for tosa backend.
Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
2022-09-07 16:58:27 +05:30
Quinn Dawkins
cc86cc0f02
Revert "Implement Non-Expand/Collapse Functionality for Aten.View ( #1309 )" ( #1347 )
...
Reverting commit a6a48ba233
to revise unit tests and address dynamic shape handling based on comments in #1309
2022-09-07 01:38:11 -04:00
JakopinA
a6a48ba233
Implement Non-Expand/Collapse Functionality for Aten.View ( #1309 )
...
Focuses on statically sized cases such as [2, 3] -> [3, 2].
2022-09-06 14:46:04 -04:00
Tanyo Kwok
37f57a9828
Delete ConvertAtenNativeLayerNormOp from TorchToLinalg ( #1336 )
...
The ConvertAtenNativeLayerNormOp is delete because we have decomposition already
see https://github.com/llvm/torch-mlir/pull/1332
2022-09-05 10:19:20 +08:00
Tanyo Kwok
29cafdbb61
[MHLO] refactor pass configurations ( #1315 )
...
Related to https://github.com/llvm/torch-mlir/issues/1227
1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
2022-09-01 10:36:02 +08:00
Ashay Rane
e52e886845
build: update llvm tag to 00d648bd ( #1307 )
...
- Update MHLO commit to build with LLVM commit hash 00d648bd
- Update TorchToMhlo code to work with Stablehlo
- Re-enabled two failing TOSA tests, thus resolving Github Issue #1231
2022-08-30 14:44:00 -05:00
Sean Silva
51ef1b141c
Add some missing dependencies.
...
Caught in the wild here:
https://github.com/llvm/torch-mlir/runs/8046660640?check_suite_focus=true
It is common for a missing dependency to only surface as an issue on the
CI machines since they have fewer cores which prevents a "race" that
happens to cause the dependency to be built before the dependent.
2022-08-30 11:52:30 -07:00
Ashay Rane
1d9d925f6e
mlir: fix replacement of `OpaqueElementsAttr` ( #1274 )
...
An earlier patch (bb47c166
) incorrectly replaced the now-dropped
`OpaqueElementsAttr` with `SparseElementsAttr` in one place and with
`DenseElementsAttr` in another. This patch fixes the problem by making
both replacements use the dense-equivalent type.
2022-08-24 17:10:40 -05:00
gpetters94
f012279fa2
Add transposed case for at::convolution ( #917 )
...
Also adds a decomposition for aten::conv_transposed2d.input
2022-08-24 12:19:35 -04:00
Tanyo Kwok
3d0e18bbe7
Add decomposition for aten.roll ( #1170 )
...
* Add decomposition for aten.roll
* add e2e unittest
* refine type of torch.roll
* fix aten::cat output type
2022-08-24 08:36:05 +08:00
Tanyo Kwok
2374098d71
[MHLO] Init end to end unit tests ( #1223 )
2022-08-23 16:47:21 +08:00
Vivek Khandelwal
65d811e267
[MLIR][TORCH] Fix dynamic cases for aten.index.Tensor
2022-08-19 12:13:20 +05:30
武家伟
7bd173a1c4
[MHLO] Eliminate explicit dynamic output shape generating in converting AtenSliceTensorOp ( #1245 )
...
[MHLO] Eliminate explicit dynamic output shape generating in converting AtenSliceTensorOp
2022-08-19 10:14:57 +08:00
Yan Xu
9be8997536
Revert "add native_dropout and related ops pattern ( #1211 )" ( #1230 )
...
This reverts commit c935795086
.
2022-08-17 13:48:10 +08:00
武家伟
11a5b5ac52
[MHLO] Add AtenRSubScalarOp conversion pattern to MHLO ( #1233 )
...
* [MHLO] Add AtenRSubScalarOp conversion pattern
Co-authored-by: Bairen Yi <yibairen.byron@bytedance.com>
Co-authored-by: Jiawei Wu <xremold@gmail.com>
Co-authored-by: Tianyou Guo <tianyou.gty@alibaba-inc.com>
Co-authored-by: Xu Yan <yancey.yx@alibaba-inc.com>
Co-authored-by: Ziheng Jiang <ziheng.jiang@bytedance.com>
2022-08-17 09:07:36 +08:00
nithinsubbiah
fde390c766
Re-enable custom op support
2022-08-16 22:49:08 +05:30
Ashay Rane
84d345c650
build: update llvm tag to 2dde4ba6 ( #1229 )
...
Summary of changes:
- Tensor dialect now sets `emitAccessorPrefix` to prefixed, thus
requring updates to methods that retrieve arguments
[https://reviews.llvm.org/D131361 ]
- Update MHLO to build with LLVM commit hash 2dde4ba6
- Replace `AbsOp` with `AbsFOp` [https://reviews.llvm.org/D131325 ]
- Replace deprecated `getValue()` with `value()`
[https://reviews.llvm.org/D131349 ]
- Remove `AnalysisState::defaultInitialize()`
[https://reviews.llvm.org/D131746 ]
- Update MHLO MLIR tests to use the updated assembly format
- Disabled two failing TOSA tests (Github Issue link:
https://github.com/llvm/torch-mlir/issues/1231 )
2022-08-15 23:54:45 -07:00
Ramiro Leal-Cavazos
9d6ee48661
Fix unused-variables warnings about EmbeddingBag ops ( #1220 )
...
According to the documentation for
`torch.embedding_bag` (https://pytorch.org/docs/stable/generated/torch.nn.functional.embedding_bag.html ),
the default value for `scale_grad_by_freq` is False.
2022-08-15 09:43:55 -07:00
Yan Xu
c935795086
add native_dropout and related ops pattern ( #1211 )
2022-08-15 09:28:47 +08:00
Prashant Kumar
b1a506624c
Add decomposition of `aten.masked.tensor` op.
...
`aten.masked.tensor` op has been decomposed to `aten.masked.scalar` op.
2022-08-11 07:48:04 +05:30
Yan Xu
d96ec64be1
remove torch dialect from legal list ( #1192 )
2022-08-11 09:22:41 +08:00
Vidush Singhal
dd2da5a038
E2E support for AtenRemainderScalarOp ( #1200 )
2022-08-10 20:02:06 -04:00
Ramana Radhakrishnan
738f4fe96a
Rename TorchToStd pass as TorchToArith ( #1163 )
...
All the converters in this pass appear to create ops from the
arith dialect. Hence the full rename.
Fix GH Issue #409 .
2022-08-10 20:12:51 +01:00
武家伟
87562773f8
[MHLO] Add AtenCatOp conversion pattern to MHLO ( #1208 )
...
Co-authored-by: Bairen Yi <yibairen.byron@bytedance.com>
Co-authored-by: Jiawei Wu <xremold@gmail.com>
Co-authored-by: Tianyou Guo <tianyou.gty@alibaba-inc.com>
Co-authored-by: Xu Yan <yancey.yx@alibaba-inc.com>
Co-authored-by: Ziheng Jiang <ziheng.jiang@bytedance.com>
Co-authored-by: Vremold <xremold@gamil.com>
2022-08-09 22:12:34 -07:00
Yan Xu
f83a905856
[MHLO]fix lowering failed on reduction op with i32 shape ( #1185 )
...
fixed lowering failed on torch::max.dim while shape type is i32
2022-08-09 17:02:50 +08:00
powderluv
e55fc4deb5
Revert "E2E support for AtenRemainderScalarOp ( #1119 )" ( #1190 )
...
This reverts commit 34e207eeb5
.
2022-08-08 22:59:57 -07:00
Ashay Rane
bb47c166a0
llvm: update tag to 061e0189 ( #1180 )
...
Summary of changes:
- Switch to C++17 (similar to https://reviews.llvm.org/D131348 )
- Update MHLO to build with LLVM commit hash 061e0189
- Replace deprecated `hasValue()` and `getValue()` with `has_value()`
and `value()` respectively (https://reviews.llvm.org/D131349 )
- Use `TypedAttr` (https://reviews.llvm.org/D130092 )
- Use updated assembly format of `mhlo.compare` op (commit
d03ef01e70fbf9afd0fa1976fbb7ed31838929b3 in MHLO repo)
2022-08-08 20:17:35 -07:00