torch-mlir/lib/Dialect
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
..
ATen Bump llvm-project to c68d2895a1f4019b387c69d1e5eec31b0eb5e7b0 2021-02-22 12:23:24 -08:00
Basicpy Bump llvm-project to c68d2895a1f4019b387c69d1e5eec31b0eb5e7b0 2021-02-22 12:23:24 -08:00
Numpy NFC: mark some methods as `override` 2021-01-21 11:48:41 -08:00
Refback [RefBackend] Use std.global_memref instead of homegrown thing 2020-11-13 18:43:50 -08:00
Refbackrt Bump llvm-project to d50d7c37a159802c89454a6c53c0ec2e7949d84a 2020-12-14 14:30:51 -08:00
TCF Bump llvm-project to 16c6e9c58e9ae50a775945e6b407f1891f353d2f 2021-01-05 16:12:11 -08:00
TCP Reformat code 2021-01-28 12:01:35 -08:00
Torch Add ability to annotate TorchScript classes. 2021-02-25 11:28:34 -08:00
CMakeLists.txt [RefBackend] Rename RefBackend dialect to Refback 2020-10-08 09:07:00 -07:00