torch-mlir/test
Sean Silva a375ccf9da Add ability to annotate TorchScript classes.
The first use case is to annotate certain program constructs as either
exported or private. In this commit we plumb it down to
GlobalizeObjectGraph which makes use of this information.

Recommended review order:
1. class_annotator.h/.cpp + `test/module_import/annotations/*`
    - New abstractions to communicate with Python code and annotate.
2. IR changes in TorchOps.td
    - Adding "private" attribute to various things.
3. ivalue_import.cpp changes
    - Module + ClassAnnotator = annotated IR
4. GlobalizeObjectGraph.cpp + tests
    - use new "private" attributes to create "private" IR.
    - also, tweak some of the op deleting mechanics, which was triggering
      some memory errors / assertions

With this, we can run the classifier through and inline it as follows:
```
frontends/pytorch/utils/pt_util.py --import --exported-name forward ~/tmp/classifier.pt \
| npcomp-opt -torch-globalize-object-graph -inline
```
IR: https://gist.github.com/silvasean/32dcad9f6270557f412094a77cecdd69
2021-02-25 11:28:34 -08:00
..
Backend/Iree Sever C++ level depend on IREE and rebase on exe and python interface. 2020-11-16 21:32:56 -08:00
CAPI Add prim::Print and fix prim::CallMethod 2021-02-10 15:15:56 -08:00
Conversion Bump llvm-project to c68d2895a1f4019b387c69d1e5eec31b0eb5e7b0 2021-02-22 12:23:24 -08:00
Dialect Add ability to annotate TorchScript classes. 2021-02-25 11:28:34 -08:00
Python Bump llvm-project to be7352c00d51f4358db3a23ed6a077f7cb48eafd 2021-01-21 11:16:55 -08:00
RefBackend Bump llvm-project to bc556e5685c0f97e79fb7b3c6f15cc5062db8e36 2021-01-08 14:18:09 -08:00
npcomp-run-mlir Bump llvm-project to c68d2895a1f4019b387c69d1e5eec31b0eb5e7b0 2021-02-22 12:23:24 -08:00
CMakeLists.txt Sever C++ level depend on IREE and rebase on exe and python interface. 2020-11-16 21:32:56 -08:00
lit.cfg.py Enable building using LLVM_EXTERNAL_PROJECTS. (#152) 2021-01-26 11:43:43 -07:00
lit.site.cfg.py.in Enable building using LLVM_EXTERNAL_PROJECTS. (#152) 2021-01-26 11:43:43 -07:00