Users can run via `pre-commit run` or set up a hook as described in the
instructions: https://pre-commit.com/
The CI is set to only run pre-commit on files changed in the patch. We
will run with `--all-files` in a separate patch.
Overly specific docs can get stale easily. It looks like
https://llvm.github.io/torch-mlir/package-index/ has included Windows
packages since around https://github.com/llvm/torch-mlir/pull/1521.
Here's an example release:
https://github.com/llvm/torch-mlir/releases/tag/snapshot-20240118.1087
```
torch-2.3.0.dev20240109+cpu-cp311-cp311-linux_x86_64.whl
torch-2.3.0.dev20240109+cpu-cp311-cp311-win_amd64.whl
torch-2.3.0.dev20240109+cpu-cp38-cp38-linux_x86_64.whl
torch-2.3.0.dev20240109-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
torch-2.3.0.dev20240109-cp311-none-macosx_10_9_x86_64.whl
torch_mlir-20240118.1087-cp311-cp311-linux_aarch64.whl
torch_mlir-20240118.1087-cp311-cp311-linux_x86_64.whl
torch_mlir-20240118.1087-cp311-cp311-macosx_11_0_universal2.whl
torch_mlir-20240118.1087-cp311-cp311-win_amd64.whl
torch_mlir-20240118.1087-cp38-cp38-linux_x86_64.whl
```
This was an experimental attempt at rolling out own op-by-op executor
with `__torch_dispatch__`, but it proved difficult to make it robust.
Op-by-op execution is very easy to implement robustly now with the
PyTorch 2.0 stack, so we don't need eager_mode.
Downstream users were using eager_mode to implement lockstep numerical
accuracy debuggers. We implemented the same functionality with
TorchDynamo in https://github.com/llvm/torch-mlir/pull/1681 so now there
is not much reason to continue maintaining it.
Addresses leftover comment from earlier PRs: #1254 , #1265 to remove `torch_dispatch` frontend. In addition, moves the main arch diagram into `docs/` directory for consistency.
Prior to this patch, the top-level README did not include the line for
running the Python regression tests in `//python/test`. This patch
fixes the problem by adding a line to run the `check-torch-mlir-python`
target.
- update diagram to use the name "Eager Mode" instead of
`torch.dispatch`, which wasn't a very accurate name
- rename `resnet_inference.ipynb` to
`torchscript_resnet_inference.ipynb` - this is in preparation to LTC
and Eager Mode versions
- remove mention of TorchFX - turns out that all TorchFX modules are
actually scriptable modules, so there is literally "zero code" vs
using the TorchScript path
- remove LazyTensorCore example, and instead point at the current
in-development `torch_mlir_ltc_backend` branch.
Note: there were actually some pretty useful utilities built out in the
examples directory, but they now live inside the Eager Mode
`python/torch_mlir/eager_mode/ir_building.py` (and need to be rolled
into a proper home with the upcoming rewrite of our top-level
`torch_mlir.compile` API).
This is intended to explore support for non-structured ops that can't
be modeled by Linalg dialect. `tm_tensor.scan` and `tm_tensor.scatter`
are added as the first such ops. The dialect should aim to be
upstreamed in the future.
* Also adds a requirements.txt and updates docs to reference it versus stringy pip install.
* Adds doc with instructions on creating a wheel.
Fixes#370
* Picks up Python configure changes (was pinned to a bad intermediate commit).
* Uses the new mlir_configure_python_dev_packages() to ensure CMake python is found consistently.
* Fixes the JIT importer to build as a MODULE vs SHARED (needed for linking to Python as a module, per config changes).
* Adds some notes to the README to help folks build a smaller set focused just on this project.
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