Commit Graph

814 Commits (454fa9d12338b289805d295a934a076aaf460e88)
 

Author SHA1 Message Date
Sean Silva a157d6c946 Add instructions for installing from packages. 2021-10-07 01:20:49 +00:00
Sean Silva b6628fe774 Mark releases as "published".
This allows `pip` to see them.
2021-10-06 22:48:21 +00:00
Sean Silva 4a8d05e4a5 Add torch_mlir snapshot packages.
This closely follows IREE's
[schedule_snapshot_release.yml](f2f153d394/.github/workflows/schedule_snapshot_release.yml (L1))
workflow.

The snapshot releases can be installed with:
```
python -m pip install torch_mlir -f "https://github.com/llvm/torch-mlir/releases"
```
2021-10-06 14:50:31 -07:00
Sean Silva 712445eaa8 Bring back Python packaging.
Will add a CI job that builds and uploads snapshot packages next.
2021-10-05 13:33:30 -07:00
Sean Silva dcab39146f Remove the last mentions of npcomp from torch-mlir
These snuck through.
2021-10-05 20:17:23 +00:00
dan 2e1498ad11 add i64 support to refbackend 2021-10-05 15:12:44 -04:00
Yi Zhang fadd76e9b8 E2e for MiniLM-L6-H384-uncased-sst2
Replace the original BertSequenceClassification with this new one.
The ops needed to support are identical.
2021-10-05 12:45:19 -04:00
Phoenix Meadowlark c3e0a1e1dc Add shell markdown formatting to README.md 2021-10-04 11:59:25 -07:00
Sean Silva f69630255a Add --external-config option to tools/torchscript_e2e_test.sh
This is a simple way for externals to plug their backends into the test
suite. They just implement the `TestConfig` class for their backend and
write a small script that exposes it.

I have a pending PR for iree-samples that successfully integrates this.
2021-10-04 11:48:16 -07:00
Yi Zhang 98ba255288 E2e support for layernorm. 2021-10-04 14:15:13 -04:00
Sean Silva b01f579687 Missing newline in notebook. 2021-10-04 17:53:46 +00:00
Sean Silva 4ab23261ba Fix notebook after relicensing.
The find/replace mangled it.
2021-10-04 17:52:12 +00:00
Sean Silva f0ed9e2d8d Fix update_torch_ods.sh 2021-10-01 17:47:25 +00:00
Sean Silva 5b6902e31c Dual license the torch-mlir project.
This commit (with approval from all contributors) dual licenses
the torch-mlir project under both the standard LLVM license and the
standard PyTorch license. This will facilitate moving code between
torch-mlir and the two upstream projects.

The standard file comment is now:

```
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Also available under a BSD-style license. See LICENSE.
```

See `LICENSE` in the project root for the terms of both licenses.
2021-10-01 10:46:08 -07:00
Sean Silva 5917f1dc47 Remove last mentions of IREE. 2021-10-01 17:28:07 +00:00
Sean Silva 9fc059e948 Remove old outdated roadmaps. Add placeholder new one. 2021-10-01 10:23:41 -07:00
Ramiro Leal-Cavazos 25a2c8bd85 Add notes on missing lazy tensor ops for ResNet18 and MaskRCNN 2021-09-30 16:38:12 -07:00
Ramiro Leal-Cavazos 3aef3a9e30 Remove duplicate example + fix README typo 2021-09-30 13:23:25 -07:00
Sean Silva 05a01b10b3
Add example deps for torchscript_resnet18_e2e.py 2021-09-30 12:48:35 -07:00
Sean Silva bc62a7fbf3 Update to new name of torchscript-module-to-linalg-on-tensors-backend-pipeline 2021-09-30 19:46:05 +00:00
Yi Zhang 89225b0cd8 Add BertSequenceClassification model to e2e
Use torch tracing to get the module because the original model is not
TorchScriptable out of box.
2021-09-30 13:30:29 -04:00
powderluv 649d6e4f28 Update README.md 2021-09-29 10:14:20 -07:00
Sean Silva 4a64fa28e7
Add MLP1Layer IR sample. 2021-09-29 09:20:04 -07:00
powderluv 36ac87dd83
Update Readme with examples (#336) 2021-09-28 21:43:38 -07:00
Sean Silva 8b2c099914 Update llvm-project to 204d301bb1921431a853c0bfba32007c018df1d5
This brings in the fix for the obscure RefBackend bug we were hitting.
2021-09-28 17:38:10 -07:00
Ramiro Leal-Cavazos b59f2cb673
Implement the lazytensor package (#331)
Implement the `lazytensor` python package for converting
lazy computations captured by the Lazy Tensor Core into MLIR.
This PR also fixes a few things with `torchfx` and its example
2021-09-28 17:25:06 -07:00
Sean Silva 2b99c8b990
Wordsmith readme 2021-09-28 13:53:33 -07:00
powderluv b55baf508a
Updates to Readme.md (#334) 2021-09-28 13:50:25 -07:00
powderluv 2e6c423a65
Caught by grammar police. PyTorch it is, not Pytorch. (#333) 2021-09-27 21:44:23 -07:00
Sean Silva de1a8c92f7 First pass cleaning the README 2021-09-27 17:20:50 -07:00
Sean Silva 64ce5d54d3 Update examples.
TorchFX example has been simplified, since it seems to be hitting that
weird RefBackend bug. Will dig into that.
2021-09-27 17:20:50 -07:00
Sean Silva e687d39074 Update buildAndTest.yml 2021-09-27 17:11:08 -07:00
Sean Silva 4fad753073 Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00
Sean Silva d8f603a4e5 Remove old stuff in prep for move-to-root. 2021-09-27 17:11:08 -07:00
Sean Silva 404bd74ddf Port the bulk of the remaining code to torch-mlir
This leaves no real code outside torch-mlir.

This also renames the "npcomp backend contract" to "linalg on tensors
backend contract" as the name of the abstraction layer that RefBackend
(IREE too) accepts.
2021-09-27 12:48:33 -07:00
Yi Zhang aa10ec66a7 Fix torchscript_resnet18_e2e.py and resnet_inference.ipynb
Fix the tests to run with refbackend.
2021-09-27 13:03:54 -04:00
Yi Zhang cd7053dfde Add runtime check 2021-09-24 12:01:36 -04:00
Yi Zhang c9cc4cb2e9 Add i64 tensor argument support and bring back GatherModule_basic 2021-09-24 12:01:36 -04:00
Sean Silva 12d0fe7c85 Emit a proper error.
This assertion was reachable from user code (e.g. !torch.qint8 dtype),
which should never be possible for an assertion.

Instead, emit a diagnostic.
2021-09-23 21:39:31 -07:00
Sean Silva a99cbeeb7e Move TorchConversion dialect and TorchTo* into torch-mlir 2021-09-23 21:39:31 -07:00
Sean Silva 35fa1a34cd npcomp-lsp-server -> torch-mlir-lsp-server 2021-09-23 21:39:31 -07:00
Sean Silva 01c6c54dd8 Fix dependency. 2021-09-23 21:39:31 -07:00
Sean Silva 2213584c4f VerifyBackendContract -> VerifyLinalgOnTensorsBackendContract
This moves it into TorchConversion since it is only needed there.

This removes the Backend/ directory.
2021-09-23 21:39:31 -07:00
Anush Elangovan 06559efe94 Update diagram and Readme.md 2021-09-23 14:34:02 -07:00
Sean Silva e291aa688f Bring back tools/torchscript_e2e_test.sh
Accidentally deleted it in the last commit.
2021-09-23 19:01:48 +00:00
powderluv 81a9cf7800 Update README.md 2021-09-23 11:50:02 -07:00
anush elangovan cbafe55b3a Add Torch-mlir.png Architecture Diagram 2021-09-23 11:50:02 -07:00
Ramiro Leal-Cavazos 2b18aad807 Removed import typo in torchfx example 2021-09-22 16:49:46 -07:00
Yi Zhang 603e068e45 E2e implementation for `aten.cat`,`aten.gather`, `aten.bmm`
Also contains the following changes:
- Remove derefineOp canonicalizer because it's not safe.
- Support for optional tensor and list tensors in reduceOpVariant. This
only works for some special detected and easy to handle cases. For list,
it covers the case list is got from a `ListConstruct`. For optional, it
covers the case optional is constructed from a `DerefineOp`.
- Remove the `inferReturnTypes` for `FromBuiltinTensorOp` because it's
not safe to deduce types from the input. For example, a built-in tensor
of i8 could be converted to si8 or ui8. It's better to let the user
specify the return type explicitly.
2021-09-22 19:15:01 -04:00
Sean Silva 3dc9b4ee2f Remove some more old stray files. 2021-09-22 16:13:03 -07:00