torch-mlir/frontends/pytorch/test/ivalue_import/annotations
Sean Silva 39d50ccf0d Add end-to-end testing framework for TorchScript.
The E2E tests can be run with
```
npcpy frontends/pytorch/e2e_testing/torchscript/main.py
```

This commit adds a couple items supporting that end, including new sugar
for annotations (no more raw use of ClassAnnotator!).

Recommended review order:

1. `frontends/pytorch/e2e_testing/torchscript/main.py` for
   the harness + `basic.py` in that directory for examples of tests.
2. Annotation sugar in `frontends/pytorch/python/torch_mlir/torchscript/annotations.py`
   and unittest in `frontends/pytorch/test/ivalue_import/annotations/sugar.py`
3. Global test registry / sugar in
   `frontends/pytorch/python/torch_mlir/torchscript/e2e_test/registry.py`
4. `frontends/pytorch/python/torch_mlir/torchscript/e2e_test/framework.py`
   for the meat of the testing framework (start at `run_tests`), and
   looking at the backend configs in
   `frontends/pytorch/python/torch_mlir/torchscript/e2e_test/configs`
   for examples of backends. This is likely the bulk of review time.
5. Unit tests of the framework logic in `frontends/pytorch/test/torchscript_e2e_test`

There's TODO's scattered throughout, but this seems functional enough to
start pulling stuff into and kicking the tires. A few missing pieces:

1. Marking test expected pass/fail per backend.
2. Figuring out how best to fit this into dev workflows.
3. IREE TestConfig.

Also, forgive this Python newbie... Any advice on Python code structure
/ library design would be much appreciated.
2021-04-20 12:00:35 -07:00
..
class-annotator-repr.py [cleanup] Put the root class type for exportPath first. 2021-04-01 18:40:03 -07:00
export-error.py [cleanup] Put the root class type for exportPath first. 2021-04-01 18:40:03 -07:00
export-recursive.py [cleanup] Put the root class type for exportPath first. 2021-04-01 18:40:03 -07:00
export.py [cleanup] Put the root class type for exportPath first. 2021-04-01 18:40:03 -07:00
shape-and-dtype-error.py Basic infra for annotate shapes and dtypes on arguments. 2021-04-01 18:40:03 -07:00
shape-and-dtype.py Basic infra for annotate shapes and dtypes on arguments. 2021-04-01 18:40:03 -07:00
sugar.py Add end-to-end testing framework for TorchScript. 2021-04-20 12:00:35 -07:00