Commit Graph

1816 Commits (c718f87c5de4865c831864c4624925fca18ba1a6)
 

Author SHA1 Message Date
Maksim Levental c718f87c5d
- rename no-jit -> core (#1920)
- add windows release
2023-03-07 00:20:06 -06:00
Zhekun Zhang 1d3a7419c5
[Torch Dialect] add RSub, ScalarImplicit canonicalize (#1899)
* add rsub, scalarimplit canonicalizer

* reformat

* address comments

* fix bug

* fix test

* Update elementwise.py

* resolve merge conflict

* change to 3

* change to 3

* real fix

* fix name

* add torchdynamo fail test

---------

Co-authored-by: zhekun.zhang <zhekun.zhang@bytedance.com>
2023-03-06 17:38:27 -08:00
Priya Savithiri c2ef5f4165
Add HardtanhBackward TOSA and LINALG support (#1721) 2023-03-06 10:16:37 -08:00
Ramiro Leal-Cavazos 671be048fe
Fix handling of non-int tensors in `getScalarValue` (#1914)
The current implementation of `getScalarValue` does not check that the
input to a `ValueTensorLiteralOp` is an i64 before extracting the
value, and it does not check that the result type of the
`PrimNumToTensorScalarOp` is also an i64. This leads to crashes or
invalid IR generated when the `input` is something other than an i64
tensor or `!torch.int`.

This commit addresses those issues. In addition, the function
`getScalarValue` is renamed to `getScalarIntValue` to make it clear
that it *only* extracts scalar integers.
2023-03-06 10:12:58 -08:00
Roll PyTorch Action 62250dabbb update PyTorch version to 2.1.0.dev20230306 2023-03-06 13:23:41 +00:00
Maksim Levental ac1f03e6f7
add jit,no-jit release matrix (#1916) 2023-03-05 22:13:33 -08:00
Maksim Levental 415265a64c
Add `torch-mlir-no-jit-importer` build case for mac os wheels (#1902)
* add flags to setup.py for out-of-tree build

* - fix build_ext bug
- add wheels script cases for mac wheels
2023-03-05 12:23:43 -06:00
Roll PyTorch Action 5ad2d8e435 update PyTorch version to 2.1.0.dev20230305 2023-03-05 13:21:31 +00:00
Roll PyTorch Action 3297f8cb6f update PyTorch version to 2.1.0.dev20230304 2023-03-04 13:23:32 +00:00
Ramiro Leal-Cavazos d30af8772b
Handle uninitialized lattice elements in RefineTypes (#1911)
The data-flow analysis does not always propagate information to the
entire graph. This results in some lattice elements being
uninitialized. Currently the lattice elements are not checked to see
if they are uninitialized before rewriting the graph, potentially
resulting in invalid IR (see
https://github.com/llvm/torch-mlir/issues/1896).

This commit adds handling for uninitialized lattice elements.
2023-03-03 08:55:58 -08:00
Roll PyTorch Action a4602c674c update PyTorch version to 2.1.0.dev20230303 2023-03-03 13:23:46 +00:00
Yuanqiang Liu 7a8304f935
[Torch Dialect] add folder for aten.sub.float (#1871) 2023-03-02 09:07:33 -08:00
Roll PyTorch Action 50ad5eab9a update PyTorch version to 2.1.0.dev20230302 2023-03-02 13:23:42 +00:00
Roll PyTorch Action 690b07f6e5 update PyTorch version to 2.0.0.dev20230301 2023-03-01 13:35:55 +00:00
Yuanqiang Liu fc1e091d6a
[Torch Dialect] add aten.pow.int_float op and it's folder (#1872) 2023-02-28 09:36:05 -08:00
Vivek Khandelwal 6e947b0021 build: update llvm tag to b5bf6f63
- Remove `useFoldAPI`.
- Update tags
  llvm: b5bf6f6392a3408be1b7b7e036eb69358c5a2c29
  mhlo: bb1ed5b47c036993b954e881cce7c7aab00f9962

Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-28 22:58:18 +05:30
Vivek Khandelwal a32840ffd7 build: manually update PyTorch version
Set PyTorch and TorchVision version to nightly release 2023-02-27.
This commit also adds the lowering for aten.add and aten.Float.Scalar op.

Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-28 22:43:39 +05:30
Ashay Rane 987d5ab335
CI: use `sudo` to remove Docker-created files (#1905) 2023-02-27 17:44:50 -06:00
Ahmed S. Taei 3bed35c0ee
[Bazel] Fix clang version, missing mhlo deps and add reqs files (#1898)
* Fix clang version, missing mhlo deps and add reqs files
2023-02-24 15:07:34 -08:00
nvda de05ad5aaa
Update README.md (#1880)
* Update README.md

refined formal definition

* Update README.md

toned down "revolutionary" to novel.
2023-02-24 12:46:32 -08:00
Ashay Rane ea00371d85
CI: clear workspace directory before checkout (#1900)
We have recently started seeing errors like:

```
  Synchronizing submodule url for 'externals/llvm-project'
  Synchronizing submodule url for 'externals/mlir-hlo'
  /usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1
  Error: fatal: Unable to create '/home/anush/actions-runner/_work/torch-mlir/torch-mlir/.git/modules/externals/llvm-project/index.lock': File exists.
```

As a workaround, this patch removes the workspace directory before the
checkout step.
2023-02-24 14:44:35 -06:00
Prateek Gupta 207229297e
[TORCH-MLIR] Add ODS for aten.clamp.Tensor op. (#1894)
This commit adds the ODS definition for the aten.clamp.Tensor op.

Signed-off-by: Prateek Gupta <prateek.gupta2@cerebras.net>
2023-02-24 09:18:24 -08:00
Gaurav Shukla 0afb85d45f build: update llvm tag to 5e111eb275
- Update llvm tag to 5e111eb275eee3bec1123b4b85606328017e5ee5
- mhlo now points to a99159c45ee5c497f8dce01eff807a6d57629b61

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
2023-02-23 22:57:17 +05:30
Vivek Khandelwal 6a3438f672 build: manually update PyTorch version
Set PyTorch and TorchVision version to nightly release 2023-02-20.

Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-23 11:33:41 +05:30
Zachary Cetinic e7111d473b
[Torch Dialect] Scatter reduce lowering (#1884)
- Lowers the torch.scatter_reduce to linalg_on_tensors dialect.
- Includes support for "sum", "prod", "amax", "amin" and "mean".
2023-02-21 23:05:55 +00:00
Ramiro Leal-Cavazos 52dbb160fc
Replace `torch.rand` and `torch.randn` in e2e tests with `tu.rand` (#1890)
Random tensors used in e2e tests should be created using the
`TestUtils` object passed to the registered test case to ensure that
the compiled module and the golden trace receive the same tensors as
input. This commit changes all the cases of `torch.rand` and
`torch.randn` to use the `TestUtils` instead.
2023-02-21 14:30:05 -08:00
Yuanqiang Liu eb74014dd8
[Torch] decompose aten.norm.ScalarOpt_dim to aten.linalg_vector_norm (#1849) 2023-02-20 20:08:29 -08:00
Ashay Rane 268364e061
CI: install `unzip` before using it (#1893)
The RollPyTorch action needs the `unzip` command to peek into WHL files
for fetching metadata.  This patch makes sure that the command is
installed before referencing it.
2023-02-19 17:49:08 -06:00
Ziheng Jiang 38ed559398
[StableHLO] Add support for AtenPowTensorScalar. (#1883)
* [MHLO] Add support for AtenPowTensorScalar.

* Update.

---------

Co-authored-by: Ziheng Jiang <ziheng.jiang@bytedance.com>
2023-02-16 20:26:46 -08:00
Chi_Liu e85def790c
[TOSA] Add todtype f64 and i1 to f32 support (#1845) 2023-02-16 09:10:11 -08:00
powderluv 5710871f4f
Update buildAndTest.yml (#1881)
* Update buildAndTest.yml

* Update oneshotSnapshotPackage.yml

* Update buildRelease.yml

* Update RollPyTorch.yml

* Update oneshotSnapshotPackage.yml

* Update buildAndTest.yml
2023-02-15 09:17:12 -08:00
Vivek Khandelwal b17d4d4f08
[MLIR][TORCH] Add decomposition for aten.bernoulli.p op (#1882)
Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-15 22:36:29 +05:30
Vivek Khandelwal f6f2e4d040 [MLIR][TORCH] Add support for integer type input for max.dim op
Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-15 16:14:15 +05:30
Chi_Liu 8a7340dfb5
[TOSA] aten.index.tensor multiple indexes support (#1868) 2023-02-13 23:07:15 -08:00
Ashay Rane 67ab708b63
python: separate build- and test-related pip dependencies (#1874)
We want to ensure that pip packages required for building torch-mlir
should be included in the dependencies of torch-mlir, but we don't want
the pip packages required for _testing_ of torch-mlir to be included
among the dependencies.  To be able to specify and install one set of
dependencies and not the other, this patch separates the pip packages
into two files: build-requirements.txt and test-requirements.txt.

This patch also updates references to the requirements.txt file so that
CI builds that run end-to-end tests install test-related pip
dependencies while everything else (including WHL builds) sticks to just
the build-related pip dependencies.

Despite this change, this patch should not affect a torch-mlir
developer's workflow.  More precisely, since this patch makes the
top-level requirements.txt file refer to both build-requirements.txt and
test-requirements.txt files, a torch-mlir developer should be able to
continue referring to the requirements.txt file without any impact.
2023-02-13 21:22:09 -06:00
powderluv 57b252107e
test torch / torchvision compat (#1877) 2023-02-13 15:26:44 -08:00
Maksim Levental 2eddb3fde7
WIP: No PyTorch dep (#1854) 2023-02-13 14:21:06 -06:00
Roll PyTorch Action 3cf5f4fcb7 update PyTorch version to 2.0.0.dev20230213 2023-02-13 15:23:12 +00:00
Roll PyTorch Action be4d220e81 update PyTorch version to 2.0.0.dev20230212 2023-02-12 14:45:19 +00:00
Roll PyTorch Action bb8fbc41e7 update PyTorch version to 2.0.0.dev20230211 2023-02-11 14:40:15 +00:00
Yuanqiang Liu 6ab990e1e8
[Torch Dialect] add folder for aten.Int.float (#1863) 2023-02-10 13:59:03 -08:00
Ziheng Jiang f1b8d5e581
[MHLO] Support AtenMaskedFillScalar (#1839)
* [MHLO] Support MaskedFillScalar.

* Update.

* Update.

* Update.

---------

Co-authored-by: Ziheng Jiang <ziheng.jiang@bytedance.com>
2023-02-10 13:58:39 -08:00
Yuanqiang Liu 2f6fdb7f0b
[Torch Dialect] add folder for prim.min.int (#1864) 2023-02-10 13:58:15 -08:00
powderluv 320e67ff34
Python 3.11 support (#1848)
* Python 3.11 support

* test without torchvision

* Update pytorch-requirements.txt

* Update buildRelease.yml

* Update action.yml

* Update install_macos_deps.sh

* Update build_macos_packages.sh
2023-02-10 07:16:37 -08:00
Roll PyTorch Action a7294432bb update PyTorch version to 2.0.0.dev20230210 2023-02-10 14:34:25 +00:00
Kunwar Grover 230fc3ffb6
Add compile_commands.json to gitignore (#1867) 2023-02-10 06:26:49 -08:00
Chi_Liu cc819e73dd
[TOSA] Fix broadcast_to input and output different shape support (#1855) 2023-02-09 09:15:14 -08:00
Roll PyTorch Action 83534370c3 update PyTorch version to 2.0.0.dev20230209 2023-02-09 15:23:33 +00:00
Roll PyTorch Action eb7bac7ca4 update PyTorch version to 2.0.0.dev20230208 2023-02-08 16:14:29 +00:00
Vivek Khandelwal 282c4e027b build: manually update PyTorch version
Set PyTorch and TorchVision version to nightly release 2023-02-07.
Fixes https://github.com/llvm/torch-mlir/issues/1792.

Signed-Off By: Vivek Khandelwal <vivek@nod-labs.com>
2023-02-08 11:41:58 +05:30