Commit Graph

92 Commits (main)

Author SHA1 Message Date
Sean Silva de4bcbfe9b [docs] Centralize all images in docs/images/ 2022-11-04 03:12:17 -07:00
Sean Silva 2162253401 [docs] Add long-term roadmap
Add a roadmap covering expected project evolution over the next 1-2
years.
2022-11-02 03:25:52 -07:00
Sean Silva efbebf2001 [docs] Initial code_owners.md
As discussed in #1506, this should help to distribute the review load
and ensure timely, high quality reviews.

Closes #1506
2022-10-21 04:53:00 -07: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 ffea3de412
doc: add instructions for building and testing on Windows (#1441) 2022-10-02 08:27:53 -05:00
Daniel Ellis e193e4b9be Add environment instructions to development.md 2022-09-29 13:24:39 -04:00
Sean Silva 8a91e4c962 Make docker instructions a bit more scoped
I was helping an engineer the other day who was attempting to use the Docker flow for interactive development and ran into countless issues. Add a note that it is not recommended for interactive development, and also move the Docker section down to avoid positioning it as the "default" that people should be using.
2022-09-29 08:56:56 -07:00
Sambhav Jain e749831434
[Arch] Remove torch_dispatch frontend and move figure to docs/ dir (#1372)
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.
2022-09-14 23:00:38 -07:00
powderluv 9111b9ab21
Update Torch-MLIR architecture diagram (#1265) 2022-09-14 18:47:01 -07:00
Sean Silva 1c8b389ead Add more info about unit tests. 2022-09-13 12:14:22 -07:00
Jacques Pienaar 51c868f4c0 Avoid linking to specific time
Recording was linking to specific time towards end of recording, changed to remove specific time.
2022-09-02 10:32:08 -07:00
powderluv 9f061ea97d
Dockerize CI + Release builds (#1234)
Gets both CI and Release builds integrated in one workflow.
Mount ccache and pip cache as required for fast iterative builds
Current Release docker builds still run with root perms, fix it
in the future to run as the same user.

There may be some corner cases left especially when switching
build types etc.

Docker build TEST plan:

tl;dr:
Build everythin: Releases (Python 3.8, 3.9, 3.10) and CIs.
  TM_PACKAGES="torch-mlir out-of-tree in-tree"
  2.57s user 2.49s system 0% cpu 30:33.11 total

Out of Tree + PyTorch binaries:

  Fresh build (purged cache):
    TM_PACKAGES="out-of-tree"
    0.47s user 0.51s system 0% cpu 5:24.99 total

  Incremental with ccache:
    TM_PACKAGES="out-of-tree"
    0.09s user 0.08s system 0% cpu 34.817 total

Out of Tree + PyTorch from source

  Incremental
    TM_PACKAGES="out-of-tree" TM_USE_PYTORCH_BINARY=OFF
    1.58s user 1.81s system 2% cpu 1:59.61 total

In-Tree + PyTorch binaries:

  Fresh build and tests: (purge ccache)
  TM_PACKAGES="in-tree"
  0.53s user 0.49s system 0% cpu 6:23.35 total

  Fresh build/ but with prior ccache
  TM_PACKAGES="in-tree"
  0.45s user 0.66s system 0% cpu 3:57.47 total

  Incremental in-tree with all tests and regression tests
  TM_PACKAGES="in-tree"
  0.16s user 0.09s system 0% cpu 2:18.52 total

In-Tree + PyTorch from source

  Fresh build and tests: (purge ccache)
  TM_PACKAGES="in-tree" TM_USE_PYTORCH_BINARY=OFF
  2.03s user 2.28s system 0% cpu 11:11.86 total

  Fresh build/ but with prior ccache
  TM_PACKAGES="in-tree" TM_USE_PYTORCH_BINARY=OFF
  1.58s user 1.88s system 1% cpu 4:53.15 total

  Incremental in-tree with all tests and regression tests
  TM_PACKAGES="in-tree" TM_USE_PYTORCH_BINARY=OFF
  1.09s user 1.10s system 1% cpu 3:29.84 total

  Incremental without tests
  TM_PACKAGES="in-tree" TM_USE_PYTORCH_BINARY=OFF TM_SKIP_TESTS=ON
  1.52s user 1.42s system 3% cpu 1:15.82 total

In-tree+out-of-tree + Pytorch Binaries
  TM_PACKAGES="out-of-tree in-tree"
  0.25s user 0.18s system 0% cpu 3:01.91 total

To clear all artifacts:
rm -rf build build_oot llvm-build libtorch docker_venv
externals/pytorch/build
2022-08-30 11:07:25 -07:00
Sean Silva e16b43e20b Remove "torchscript" association from the e2e framework.
We use it for more than TorchScript testing now. This is a purely
mechanical change to adjust some file paths to remove "torchscript".

The most perceptible change here is that now e2e tests are run with

```
./tools/e2e_test.sh
instead of:
./tools/torchscript_e2e_test.sh
```
2022-08-29 14:10:03 -07:00
Sean Silva f402eb270e Move development.md to docs/ for consistency 2022-08-29 13:26:25 -07:00
Prashant Kumar f245613b71 Add reference to slides and presentation. 2022-08-27 09:01:57 +05:30
Ramiro Leal-Cavazos 493f45f939
Add documentation for adding E2E tests (#1269)
This commit adds a file explaining the structure of an E2E test, as
well as useful things to keep in mind when adding new tests.
2022-08-26 23:17:43 +00:00
Henry Tu 883c6b40dd
Add LTC architecture diagram (#1291)
* Add LTC architecture diagram

* Use PNG for diagrams

* Update diagram
2022-08-26 18:21:05 -04:00
Henry Tu e869e68559
Fix LTC lib_torch_mlir_ltc.so import error (#1283)
* Build LTC to _mlir_libs directory

* Update CMakeLists.txt
2022-08-25 18:25:01 -04:00
powderluv ef89dadf52
Update Torch-MLIR Architecture Diagram (#1254)
Add MHLO path
Add custom accelarator dialects
Rename Torch Dialect back to original Torch-MLIR Dialect
(Surrounding text still refers to Torch-MLIR dialect)
Check in source for Excalidraw(https://excalidraw.com/)
so anyone can use / update it using the open source version
2022-08-22 13:09:32 -07:00
Sean Silva f601435fdf Add white background to diagram.
This makes it easier to read in dark mode browsers.
2022-08-18 15:53:43 -07:00
Sean Silva 1a7fc3915c [docs] Add architecture doc.
This attempts to get out of my head most of the critical layering and
project structure decisions for Torch-MLIR.
2022-08-18 13:29:49 -07:00
Henry Tu 47bb38d180 Reference Lazy Backend (#1045)
* Changed Example MLIR backend to Reference MLIR backend

* Moved reference_ltc_backend into csrc

* Merged sys_utils.h

* Renamed reference_ltc_backend to reference_lazy_backend

* Addressed review comments

* Update docs with new library name

* Removed _REFERENCE_LAZY_BACKEND from .gitignore

* Added reference_lazy_backend to the TorchMLIRPythonModules dependency list

Fixed typo in `ltc_examples.md`

Missed instance where `ltc_backend` was used instead of `lazy_backend`.
2022-07-30 09:40:02 -04:00
Henry Tu 61db88c9ec LTC Documentation (#1021)
* Create ltc_backend.md

* Added introduction and examples

* Added descriptions for files from autogen

* Added remaining file descriptions

* architecture overview

* Added subheadings to architecture section

* Description for implementing custom backend

* Add graphics

* Future expansion

* Remove "location" in architecture section

* Updated LTC in readme

* Remove extra space in example

* Fix typo

* Reworded vendor compilation process

* Address PR review comments

* Updated diagrams

* Add kernel registration to diagram

* Address PR comments

* Create separate ltc_examples file

* PyBind -> pybind
2022-07-30 09:40:02 -04:00
Sean Silva 5bd9362c61 Remove mention of upstream_shape_helpers
There were some leftovers.
2022-07-08 14:43:55 -07:00
Sean Silva 2a0c5de363 Update shape lib docs. 2022-06-15 16:29:16 +00:00
Sean Silva a5fe0cf063 Introduce new shape library design.
See the documentation in `docs/shape_lib.md` and
`docs/adding_a_shape_function.md` for an overview of the system.

This completely overhauls how we represent shape functions. In
particular, RefineTypes does not infer shapes anymore (only dtypes).
Shape functions are now written in (TorchScript'able) Python.

Recommended review order:

1. Read `docs/shape_lib.md` and `docs/adding_a_shape_function.md`.
1. Code and tests for ReifyShapeCalculations, DropShapeCalculations.
1. Code and tests for SimplifyShapeCalculations.
1. shape_lib_gen.py
1. Code and tests for new RefineTypes pass.
1. Random folders/canonicalizers in TorchOps.cpp and associated test in
   `canonicalize.mlir`.
1. New ReadOnly trait inferred from the registry.
1. Any miscellaneous remaining stuff.

Example `-print-ir-after-all` for ElementwiseUnaryModule:
[IR lowering dump](https://gist.github.com/silvasean/e4dc8cbc8d00aac7819602e3cbd8e212).

Example `-print-ir-after-all` for ElementwiseBinaryModule:
[IR lowering dump](https://gist.github.com/silvasean/daf6860ecced732af3568af6b1899113).
2022-03-15 12:41:58 -07:00
Sean Silva 9fc059e948 Remove old outdated roadmaps. Add placeholder new one. 2021-10-01 10:23:41 -07:00
Sean Silva a0ccfcf581 Remove some older docs. 2021-09-22 16:13:03 -07:00
Sean Silva 31c15cab2b Add 2021Q3 roadmap.
This also restructures the docs to a "roadmap" directory, to preserve
previous roadmaps / allow retrospective "grading" of how we did.
2021-06-15 10:05:25 -07:00
Sean Silva 4cf8aef5d6 Add roadmap doc. 2021-03-15 14:43:51 -07:00
Brennan Saeta 46d3dd9ddd Update links in features.md
Point to correct files instead of 404's.
2021-01-05 13:52:57 -08:00
Stella Laurenzo 47ac80491c Delete old PyTorch 1.3 type dispatch oriented code paths.
* We aren't quite at e2e parity, but we aren't going back and the old path is bit-rotted.
2020-11-12 22:27:05 -08:00
Stella Laurenzo 51d51241b4 Add scripts/documentation for VSCode setup with a docker dev image.
* Forks a subset of my shell functions into docker_shell_funcs.sh, specifically needed to create docker images that run as yourself.
* Extends the readme with the three command bootstrap to get a dev container running.
* Step by step instructions for configuring VSCode for Intellisense in either npcomp or LLVM.
* Changes LLVM config options to enable tests. This setup is now suitable for upstream changes as well without rebuilding.
2020-10-07 21:27:20 -07:00
Phoenix Meadowlark ac3d402cd6 Update broken links 2020-08-04 18:55:46 -07:00
Stella Laurenzo d5e3902b6d Fix broken link 2020-06-29 16:49:23 -07:00
Stella Laurenzo e5ac477862 Add docs on ufuncs. 2020-06-29 16:44:33 -07:00
Stella Laurenzo 272f13fc31 Update docs with notes on the numpy extension. 2020-06-29 16:37:29 -07:00
Stella Laurenzo 7bd5733d38 Add "template function" ops and importer code.
* This starts to lay down the infra for reasoning about calls
* Adds the importer code to generate IR for function calls of compiler recognized static functions.
2020-06-26 18:36:36 -07:00
Stella Laurenzo 26fd2a576e Update docs for 'macro' -> 'partial evaluation'. 2020-06-26 13:53:40 -07:00
Stella Laurenzo dd6a4e638b Add macro facility and use it to enable module and namedtuple attribute resolution. 2020-06-25 23:11:32 -07:00
Stella Laurenzo 25a580b8d3 Add section on name resolution and update broken links. 2020-06-22 23:25:30 -07:00
Stella Laurenzo 12d8459d73 Rework README, add docs, and move some scripts to better locations accordingly. 2020-06-20 11:56:13 -07:00