Commit Graph

1478 Commits (844d58279d6d37b890619955d4de7726e8bafe23)
 

Author SHA1 Message Date
Ahmed S. Taei 844d58279d
[Bazel] Update bazel_skylib version (#1498)
This should fix current bazel build
2022-10-17 09:05:54 -07:00
Roll PyTorch Action 679170702c update PyTorch version to 1.14.0.dev20221017 2022-10-17 13:40:06 +00:00
Roll PyTorch Action 5f69d2c2ef update PyTorch version to 1.14.0.dev20221016 2022-10-16 14:03:14 +00:00
Roll PyTorch Action a9177102c6 update PyTorch version to 1.14.0.dev20221015 2022-10-15 16:47:22 +00:00
Ramiro Leal-Cavazos 86095dd432
Replace linear transformation with `low` and `high` in test inputs (#1485)
This commit replaces test inputs that were being linearly transformed
by multiplying and adding/subtracting to the input tensor with inputs
that use the `low` and `high` keyword arguments instead.
2022-10-14 18:52:07 +00:00
Gleb Kazantaev bdb5083d33
New ops support & enhancements (#1494)
* New ops support & enhancements

* Enabled xfail ltc tests
2022-10-14 10:28:21 -04:00
Roll PyTorch Action 7df9179f85 update PyTorch version to 1.14.0.dev20221014 2022-10-14 14:04:52 +00:00
Roll PyTorch Action a0dd0ddcbf update PyTorch version to 1.14.0.dev20221013 2022-10-13 14:13:56 +00:00
Ashay Rane 0374a6da4e
ci: re-enable auto execution of the RollPyTorch action (#1488)
Now that the RollPyTorch action seems to have become stable, this patch
enables that action to be run at around 4am Pacific Time every day.
2022-10-12 19:18:54 -05:00
Prashant Kumar 3a2cd23380 [LINALG] Add lowering for aten::round op.
-- Added the lowering for aten::round op.
-- Added the folding for integer cases.
2022-10-13 02:41:26 +05:30
Ramiro Leal-Cavazos 8f76c74be9
Remove unused input tensor from linalg.generic in aten.convolution (#1487)
This commit removes the `weight` tensor from the inputs of one of the
`linalg.generic` ops generated by the `aten.convolution` linalg
lowering, since the indexed values are not actually used by the body
of the `linalg.generic`. Moreover, in general the `weight` tensor does
not have the same shape as the output tensor of the `linalg.generic`,
so both tensors being indexed by the same indexing maps is wrong.
2022-10-12 14:01:24 -07:00
Roll PyTorch Action b487113ef1 update PyTorch version to 1.14.0.dev20221012 2022-10-12 14:37:13 +00:00
Daniel Ellis c085da148a Publish Python 3.7 packages.
This is the runtime Colab uses.
2022-10-12 08:50:12 -04:00
Sean Silva c8280d67bd Remove the heavydep tests
We originally added these to help bring up more complex models with
heavier dependencies. However, over time it has become clear that these
models usually require more than just heavier dependencies -- they often
require a nontrivial amount of "one-off" code to extract the relevant
parts of the model and compile them. This is not a good fit for a
component in the core Torch-MLIR repo.

However, in the community, nod.ai has developed the ["Shark
Tank"](https://github.com/nod-ai/SHARK/tree/main/tank) which has all the
appropriate code to wrangle these models and organize them. We intend to
more heaviliy lean on that as a community and improve the symbiosis
there to serve the role that these heavydep tests were meant to play.
2022-10-12 05:19:36 -07:00
Sean Silva 6403c0e56f torch_mlir.compile: allow custom backend_legal_ops set
Allow customizing `backend_legal_ops` for "torch" output type, since we
don't know which backend will be used (it might be a custom backend).
We don't allow customizing the `backend_legal_ops` for the other output
types (Linalg, TOSA, MHLO) since those backends control their set of
legal ops directly.

Fixes #1418
2022-10-12 04:21:22 -07:00
Abhishek Varma 61db1b5c4d
[MLIR][TORCH] Add e2e support for `aten.Mish` op (#1470)
-- This commit adds e2e support for `aten.Mish` op.
-- `aten.Mish` op is decomposed as following :-
    Mish(x) = x * Tanh(Softplus(x))

Signed-off-by: Abhishek Varma <avarma094@gmail.com>

Signed-off-by: Abhishek Varma <avarma094@gmail.com>
2022-10-11 14:03:10 -07:00
Daniel Ellis 67a0fb14ef Fix build release workflow. 2022-10-11 15:19:53 -04:00
Jae Hoon (Antonio) Kim 3e08f5a779
Fix `fromIntArrayRef` call (#1479)
* Fix fromSymint call

* Update PyTorch requirement

* Re-enable LTC
2022-10-11 13:29:07 -04:00
Ashay Rane aefbf65e27
Disable LTC and update PyTorch (#1472)
* build: disable LTC again so that we can bump PyTorch version

When built using PyTorch's master branch, the LTC code has been failing
to build for a few days.  As a result, the PyTorch version referenced by
Torch-MLIR is stalled to the one from October 4th.

In an effort to advance to PyTorch version, this patch disables LTC, and
a subsequent patch will advance the PyTorch version.

* update PyTorch version to 1.14.0.dev20221010

Also disables the `UpSampleNearest2dDynamicFactor_basic` e2e test, since
the (PyTorch) oracle differs from the computed value for both the
refbackend and the eager_mode backends.
2022-10-10 23:05:40 -05:00
Gaurav Shukla da90a25f90 [MLIR][TORCH] Add E2E support for `aten.[div.int|bitwise_or.Tensor]` ops
This commit adds lowering of `aten.div.int` and `aten.bitwise_or.Tensor`
ops. Both these ops are required in order to support bloom_560m model.

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
2022-10-10 22:28:51 +05:30
Daniel Ellis 2e0d806bf7 Publish releases page after both mac and linux builds.
Mac was finishing first, causing linux releases to be lagged a day behind.
2022-10-10 10:37:02 -04:00
Vivek Khandelwal d4e1867e90 [MLIR] Fix bazel build
Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-10-06 23:16:51 +05:30
Vivek Khandelwal d3cc3f1aff [tosa] Add lowering for aten.to.dtype and aten._to_copy op
This commit adds the TorchToTosa lowering for `aten.to.dtype` and
`aten._to_copy` op.

Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-10-06 12:00:25 +05:30
Vivek Khandelwal 56f9a9b5de [tosa] Add TorchToTosa lowering for torch.prim.NumToTensor.Scalar op
Signed-Off By: Vivek Khandelwal<vivek@nod-labs.com>
2022-10-06 12:00:25 +05:30
Ramiro Leal-Cavazos 8201e7b067
[LINALG] Make `AtenMaxDimOp` use `arith.maxf` to calculate maximum (#1466)
This commit updates the linalg conversion of `AtenMaxDimOp` to use
`arith.maxf` instead of `arith.select` to calculate the maximum. This
allows better vectorization further downstream, since the operation
can be converted to a simple max reduction when the `indices` result
is not used. See: https://github.com/iree-org/iree/issues/10666.
2022-10-05 18:22:59 -07:00
Daniel Ellis e7b2b84a66 Update torch-mlir-opt error message. 2022-10-05 15:02:10 -04:00
Jae Hoon (Antonio) Kim c57d801260
Fix functionalize_aten_op calls for symint ops (#1459)
* Fix functionalize_aten_op calls for symint ops

* Update PyTorch version
2022-10-05 10:23:48 -04:00
Ashay Rane faa9a78e38
build: update llvm tag to 6f46ff37 (#1448)
Summary of changes:
 - Updated references to the Arith dialect
   (https://reviews.llvm.org/D134762)
 - Switched to prefixed accessors for MemRef dialect
   (https://reviews.llvm.org/D134995)
 - Fixed warnings about signed/unsigned comparisons, ignored return
   values, and unused variables
2022-10-05 08:28:06 -05:00
Gleb Kazantaev 708fa346a6
Fix Base Lazy Backend Type Conversion (#1412)
* Fix c10::prim::Constant conversion; Added CAPI for passes; Added passes to base lazy backend

* Update ivalue_importer to use ImportOptions; Added tests for non-value/value tensor types

* Added tests for scalar Constant import; Updated MB::importFunction to use ImportOptions

* Test updates

* Move back module variable name

* Remove RefineTypes from TorchMlirLoweringContext::Build()

* Rename pass; Remove passes from base lazy backend

* Rename pass to VerifyBackendContractPass

* Aligned cmd pass name; Fixed TorchConversion passes registration
2022-10-04 15:53:28 -07:00
Gleb Kazantaev eda18e351c
LTC aten.where support (#1455)
aten.where support
2022-10-04 10:17:41 -07:00
Ashay Rane 760cb13be0
build: switch to the correct directory before updating ODS (#1452) 2022-10-04 11:24:32 -05:00
Daniel Ellis 2ba71af651 Add support for mv decomposition. 2022-10-04 11:34:45 -04:00
Prashant Kumar 6777a9484d [LINALG] Add lowering for the aten.upsample_nearest2d op. 2022-10-04 17:20:29 +05:30
Ashay Rane 8a8e779529
Disable auto-update of PyTorch version until CI script stabilizes (#1456)
Instead of letting the auto-update script either fail because of script
errors or letting it commit bad versions, this patch makes the update
process manual, for now.  Once the script stabilizes, I will its
re-enable periodic execution.
2022-10-04 03:02:44 -05:00
Roll PyTorch Action 7da1af85c2 update PyTorch version to 1.13.0.dev20221003 2022-10-03 16:35:07 +00:00
Ashay Rane da02390188
build: update ODS and shape library when updating PyTorch (#1450)
Updating the PyTorch version may break the Torch-MLIR build, as it did
recently, since the PyTorch update caused the shape library to change,
but the shape library was not updated in the commit for updating
PyTorch.

This patch introduces a new default-off environment variable to the
build_linux_packages.sh script called `TM_UPDATE_ODS_AND_SHAPE_LIB`
which instructs the script to run the update_torch_ods.sh and
update_shape_lib.sh scripts.

However, running these scripts requires an in-tree build and the tests
that run for an in-tree build of Torch-MLIR are more comprehensive than
those that run for an out-of-tree build, so this patch also swaps out
the out-of-tree build for an in-tree build.
2022-10-02 18:02:34 -05:00
powderluv 796c317aa9
doc: Use $PWD as cross platform way to get working dir (#1451)
Use "$PWD" as it works across Powershell / Windows, macOS and Ubuntu/Linux.
2022-10-02 14:08:43 -07:00
Ashay Rane 005d40f4d7
build: check exit code without causing script to fail (#1447)
A bug in the CI script caused the entire script to fail if the exit code
of the command for comparing with the existing hash returned a non-zero
exit status.  The non-zero exit status for this comparison does not
imply failed execution, since it only indicates that the hash has
changed.
2022-10-02 16:04:26 -05:00
Ashay Rane 855d267c57
build: update shape library after PyTorch version update (#1449)
The auto-update of the PyTorch version broke the Torch-MLIR build
because it did not update the shape library.  Going forward, we should
add the shape library update to the PyTorch version update action.
2022-10-02 14:05:53 -05:00
Roll PyTorch Action f32869b854 update PyTorch version to 1.13.0.dev20221002 2022-10-02 17:09:55 +00:00
Ashay Rane ffea3de412
doc: add instructions for building and testing on Windows (#1441) 2022-10-02 08:27:53 -05:00
Daniel Ellis 4d47f1671a Reject dictionary inputs when tracing.
The underlying error message was misleading.  See https://github.com/llvm/torch-mlir/issues/1425
2022-09-30 16:02:35 -04:00
Ashay Rane b3345e69e2
build: miscellaneous performance improvements (#1443) 2022-09-30 12:47:43 -05:00
Vivek Khandelwal 9dd5ae8239
[tosa] Add TorchToTosa lowering for aten.arange.start_step op (#1442) 2022-09-30 07:33:41 -07:00
Roll PyTorch Action aa31be720a update PyTorch version to 1.13.0.dev20220930 2022-09-30 13:27:54 +00:00
AmosLewis 940959589b [MLIR][TORCH] Add Byte and Char Dtype support 2022-09-30 13:19:31 +05:30
Sambhav Jain 0765449684
[Bazel] Make pytorch-requirements.txt available within the docker container (#1439)
Updates the bazel Dockerfile to match changes from https://github.com/llvm/torch-mlir/pull/1419. This should get the bazel build back to green.

Also triggered bazel build on GHA here: https://github.com/sjain-stanford/torch-mlir/actions/runs/3154741943. Let's wait for it to complete before landing this.
2022-09-29 16:30:31 -07:00
Ashay Rane cf41a2582e
Final changes necessary to auto-update PyTorch version (#1438)
* build: push directly from CI to main branch

This avoids the need to create, approve, and merge a separate PR, in
addition to avoiding unnecessary CI runs for the PyTorch version update.

* build: schedule cronjob to run RollPyTorch action

This patch schedules the RollPyTorch action to be run at noon UTC, which
roughly corresponds to 4am Pacific Time.  We pick this time since the
commit for PyTorch nightly releases are picked just after midnight
Pacific Time and the nightly release artifacts are produced in about 2
to 3 hours after the commit is picked.
2022-09-29 17:15:32 -05:00
Roll PyTorch Action 15e1c45ed6 update PyTorch version to 1.13.0.dev20220929 2022-09-29 20:34:45 +00:00
powderluv da584fbb73
Update releases pages after release builds (#1432)
* Update buildRelease.yml

Update Releases right after a Release build.

* Move gh-page update after release builds

This removes the periodic update and updates after a release build.
2022-09-29 12:49:41 -07:00