Commit Graph

2001 Commits (1eb992876c6ac23843b49120c69889937755ae9e)
 

Author SHA1 Message Date
Ramiro Leal-Cavazos ab694dfbc1 Add complex dtype support on refbackend 2023-05-11 21:29:07 +05:30
Prashant Kumar 3cd91affbc Add complex types support with basic complex ops.
Add complex types support with basic complex types.
Add aten.imag and aten.real op lowering via linalg_backend.
2023-05-11 21:29:07 +05:30
rahul shrivastava 86429d9656 Add e2e native_group_norm test-cases
Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-05-11 21:21:12 +05:30
rahul shrivastava 40a2c501a1 Add ODS for group_norm
- Add ODS for native_group_norm/backward.
- Add shape-inference for native_group_norm/backward .

Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-05-11 21:21:12 +05:30
yifei410 86718cb203
[TOSA] lowering support for aten cat (#2039)
Add support for lowering torch.aten.cat to tosa.concat

* add support for aten cat to tosa

---------

Co-authored-by: yifei <y.zhou@xilinx.com>
Co-authored-by: Lisa Liu <lingl@xilinx.com>
2023-05-10 08:25:58 -07:00
Ashay Rane 377720af87
CI: create PR for RollPyTorch updates (#2106)
Currently, we run just the Linux in-tree tests when the RollPyTorch
workflow runs, but this is insufficient since WHL files for macOS or
Windows are sometimes not uploaded by PyTorch, causing the RollPyTorch
action to pass but all subsequent torch-mlir CI tests to fail because of
the broken build.

The easiest way to validate the RollPyTorch action on all platforms is
to run the standard set of tests that we run for each submitted PR, so
this patch makes the RollPyTorch action submit a PR instead of
committing the changes to the main branch directly.  The PR is assigned
to a handful of folks for review, although this can be changed in the
future.
2023-05-10 09:25:59 -05:00
Sean Silva d7614c261d Integrate LLVM
LLVM: 26ee8947702d79ce2cab8e577f713685a5ca4a55
MHLO: 4805d8498dfb81566076f56f52273b426c1cc5bf

Per: https://github.com/llvm/torch-mlir/issues/1178#issuecomment-1538492185
2023-05-09 10:14:27 -07:00
Chi_Liu 51e0a2c933
[Stablehlo] Add stablehlo support for aten.abs (#2068)
Co-authored-by: AmosLewis <Amos_Lewsi@foxmail.com>
2023-05-08 22:13:00 -07:00
Maksim Levental c7a24c4d21
[CMake] Add headers to install target (#2100) 2023-05-08 14:27:00 -05:00
Yuanqiang Liu ef6dae6ae2
[Linalg] fix lowering reduce max with -inf (#2097) 2023-05-08 09:17:49 -07:00
Roll PyTorch Action 11a91b9d14 update PyTorch version to 2.1.0.dev20230508 2023-05-08 13:19:18 +00:00
Yuanqiang Liu 0096ceae2f
[Stablehlo] fix reduce max init_value with -inf (#2064)
* [Stablehlo] fix reduce max init_value with -inf

* update
2023-05-06 12:05:51 -07:00
Roll PyTorch Action 0d0366c319 update PyTorch version to 2.1.0.dev20230506 2023-05-06 13:18:36 +00:00
Yuanqiang Liu 9f1ed4b2ba
[Torch Dialect] typo fix for RefineTypes (#2087) 2023-05-05 15:22:14 -07:00
Zhekun Zhang fc62b8e9ab
[StableHlo] Fix AtenWhereSelfOp convert rule (#2093)
* fix whereself convert rule

* use int to test promotion

* add dynamo failing test

---------

Co-authored-by: zhekun.zhang <zhekun.zhang@bytedance.com>
2023-05-05 15:21:55 -07:00
Roll PyTorch Action eaaaeb6ff1 update PyTorch version to 2.1.0.dev20230505 2023-05-05 13:26:09 +00:00
Vivek Khandelwal 378860f51b [MLIR][TORCH] Add E2E support for aten.topk op
This commit adds the decomposition for the aten.topk op.

Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2023-05-05 15:50:33 +05:30
Zhekun Zhang 1eceb84899
add stablehlo support for pow.tensor_tensor (#2086)
Co-authored-by: zhekun.zhang <zhekun.zhang@bytedance.com>
2023-05-04 09:55:03 -07:00
Zhekun Zhang 0cf9ee340b
[Torch Dialect] Add to.dtype_layout canonicalize patterns (#2062)
* add to.dtype_layout canonicalize patterns

* update comment

---------

Co-authored-by: zhekun.zhang <zhekun.zhang@bytedance.com>
2023-05-02 20:06:02 -07:00
Yuanqiang Liu c596d11b98
[Torch Dailect] add canonicalize pattern for prim.device (#2066) 2023-05-02 20:05:46 -07:00
Ramiro Leal-Cavazos f9c2b46e62
[build] Update llvm tag to 68754241 (#2079)
This commit updates the `llvm-project` and `mlir-hlo` submodules to
commits:

- llvm-project: 6875424135312aeb26ab8e0358ba7f9e6e80e741
- mlir-hlo: 92fd33a4bacbeb93ab276a49f38bdebd5f9d7487

The calls to `mlir::MlirOptMain` are updated to no longer specify the
flag `preloadDialectInContext` that has been removed (see:
https://reviews.llvm.org/D149039).
2023-05-02 09:13:54 -07:00
Maksim Levental 100cb46baa
[Dynamo] fix TORCHDYNAMO_CRASHING_SET (#2082) 2023-05-01 21:35:26 -05:00
Ramiro Leal-Cavazos 55caaf6dda
Revert "update PyTorch version to 2.1.0.dev20230430" (#2080)
This reverts commit eab1930c49.

The PyTorch version does not yet exist for MacOS.
2023-05-01 15:57:54 -07:00
Roll PyTorch Action eab1930c49 update PyTorch version to 2.1.0.dev20230430 2023-04-30 13:16:50 +00:00
Maksim Levental 2b56ee46e1
Missing ";" bewtween includes in MHLOTargets.cmake (#2074)
Co-authored-by: Tilmann Bartsch <info@tebartsch.ai>
2023-04-29 18:05:20 -05:00
Roll PyTorch Action 2994ba00f2 update PyTorch version to 2.1.0.dev20230429 2023-04-29 13:17:28 +00:00
Maksim Levental c9fba95642
[Dynamo] turn on `no_python=True` for dynamo tests (#2040) 2023-04-28 18:05:17 -05:00
Roll PyTorch Action 61a8142d23 update PyTorch version to 2.1.0.dev20230428 2023-04-28 13:31:17 +00:00
Ze Zhang 7b73e0cfaf
Add e2e linalg support for aten.atan (#2070)
* new atan op

* update shape

---------

Co-authored-by: Ze Zhang <ze.zhang@getcruise.com>
2023-04-28 00:04:58 -07:00
rahul shrivastava a58442b50d Add ODS for aten.pow.Scalar
Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-04-27 22:09:45 +05:30
Vivek Khandelwal 491ae5eda4 [MLIR][TORCH] Add E2E support for aten.var_mean.dim op
This commit adds the decomposition for the aten.var_mean.dim op.

Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2023-04-27 22:00:44 +05:30
Ramiro Leal-Cavazos c8e062fb4e
Fix default value of `stride` in 2d pooling ops in linalg and tosa (#2065)
When the user does not specify the `stride` value in 2d pooling ops,
`stride` is given the value of an empty list. However, the current
lowerings for pooling ops assumed that the `stride` operand would
always be a list of two ints, leading to crashes when that was not the
case. This commit fixes the crashes by setting the value of `stride`
to `kernel_size` when `stride` is the empty list, since this is the
default `stride` value specified in PyTorch docs. See:
https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html#torch.nn.MaxPool2d
2023-04-27 08:31:36 -07:00
Roll PyTorch Action 24381abea4 update PyTorch version to 2.1.0.dev20230427 2023-04-27 13:32:54 +00:00
Roll PyTorch Action 4f1e8f66ae update PyTorch version to 2.1.0.dev20230426 2023-04-26 13:32:25 +00:00
Eric Kunze 6a833e1922
Update to LLVM 3157f03a349cfc852cdd994675eaa9652caa2e3a (#2060)
New requirement to explicitly cast for interfaces https://reviews.llvm.org/D148493
2023-04-25 08:52:46 -07:00
Roll PyTorch Action 6b19c5e582 update PyTorch version to 2.1.0.dev20230425 2023-04-25 13:20:34 +00:00
rahul shrivastava e3d876af42 Add aten.scatter.value Op ODS
Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-04-25 11:40:19 +05:30
Ramiro Leal-Cavazos 0831424f52
Revert PyTorch rolls to green version (#2053)
This reverts commit 0bf31ae614.
This reverts commit f7a1a076fa.

The last two PyTorch rolls have PyTorch versions that don't currently work on MacOS. This commit reverts to a PyTorch version that does work.
2023-04-24 14:17:34 -07:00
rahul shrivastava b0f166bb9a Add Nll_loss2d
- Add both forward and backward op
- Add end-to-end xfailed testcases

Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-04-24 23:47:26 +05:30
rahul shrivastava 85916dab33 Add ODS for aten.scatter.src
Signed-off-by: rahul shrivastava <rahul.shrivastava@cerebras.net>
2023-04-24 23:46:35 +05:30
Sambhav Jain a3a62a9951
[Bazel] Add `@llvm_zstd` to WORKSPACE (#2049)
This un-breaks Bazel CI since b31c5fa1fb.

Manually triggered GHA: 
- https://github.com/sjain-stanford/torch-mlir/actions/runs/4764744603 (failed)
- https://github.com/sjain-stanford/torch-mlir/actions/runs/4769130681 (with buildifier fix)
2023-04-24 10:02:33 -07:00
Roll PyTorch Action 0bf31ae614 update PyTorch version to 2.1.0.dev20230424 2023-04-24 13:20:17 +00:00
Roll PyTorch Action f7a1a076fa update PyTorch version to 2.1.0.dev20230423 2023-04-23 13:18:31 +00:00
Roll PyTorch Action 9c6e706f8d update PyTorch version to 2.1.0.dev20230422 2023-04-22 13:20:47 +00:00
Roll PyTorch Action 56182e434a update PyTorch version to 2.1.0.dev20230421 2023-04-21 13:22:53 +00:00
Ramiro Leal-Cavazos 96d662647f
Fix import of constant bool tensor parameters (#2047)
Bool tensors are represented in TorchScript as an array of
`int8_t`s. However, when importing them into Torch-MLIR, the importer
was assuming the array had `int32_t` elements, leading to the importer
reading into memory that was out of bounds. This commit fixes the
casting of the bool tensor.
2023-04-20 18:38:48 -07:00
Roll PyTorch Action 97fbb6334b update PyTorch version to 2.1.0.dev20230420 2023-04-20 13:23:29 +00:00
Ramiro Leal-Cavazos f85f5799e4
Fix creation of empty tensor in decomposition for randn ops (#2043)
The current decomposition for `aten.randn.generator` does not specify
the `dtype` argument of the empty tensors created to store the random
values. This leads to invalid IR when the output type of the `randn`
op is not the default PyTorch dtype.
2023-04-19 08:25:39 -07:00
Roll PyTorch Action dbbcc4aaff update PyTorch version to 2.1.0.dev20230419 2023-04-19 13:21:44 +00:00
Chi_Liu 8d25dd454f
[TOSA] Add torch.prim.NumToTensor.Scalar float support (#1802) 2023-04-18 13:36:57 -07:00