torch-mlir/test/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 Add a number of kernels and new patterns. 2020-11-04 14:36:59 -08:00
Basicpy Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
Numpy Bump llvm-project to be7352c00d51f4358db3a23ed6a077f7cb48eafd 2021-01-21 11:16:55 -08:00
Refback [RefBackend] Use std.global_memref instead of homegrown thing 2020-11-13 18:43:50 -08:00
Refbackrt [RefBackend] Fix leaks related to ABI boundaries. 2020-11-25 13:09:58 -08:00
TCF Add TCF convolutional op with bias addition (#137) 2020-12-15 12:53:12 -08:00
TCP Fix TensorFromElementsOp reference 2021-01-28 12:01:35 -08:00
Torch Add ability to annotate TorchScript classes. 2021-02-25 11:28:34 -08:00