torch-mlir/frontends/pytorch/test/torchscript_e2e_test
Sean Silva 6105b0f851 E2E framework: Add support for list/dict/scalar values
Most of the change is in the reporting code to give error messages that
are useful, and adjusting TraceItem to be semantically correct w.r.t.
Python's modeling of return values.

This allows writing a test like `ListLiteralModule_basic` for list
functionality, which we will soon be hooking up to IREE.

The IR for that test currently gets this far:
```
builtin.func @forward(%arg0: f64) -> !torch.list<!torch.float> {
  %0 = torch.from_f64 %arg0
  %1 = torch.prim.ListConstruct %0, %0 : (!torch.float, !torch.float) -> !torch.list<!torch.float>
  return %1 : !torch.list<!torch.float>
}
```

It should be sufficient to just add a conversion of
`torch.prim.ListConstruct` (+ relevant type conversion) to necessary
IREE primitives.

For lists of *tensors* (rather than scalar floats), it gets more
complicated, as we need to deal with changing their element type to
ValueTensorType first (by default, they will all be NonValueTensorType).
It seems that IREE might have a type we can lower into for non-value
tensors as well, TBD.
2021-08-11 10:55:43 -07:00
..
README.md Add end-to-end testing framework for TorchScript. 2021-04-20 12:00:35 -07:00
basic.py E2E framework: Add support for list/dict/scalar values 2021-08-11 10:55:43 -07:00
compilation_failure.py Add E2E support for tests with heavy dependencies (heavydep tests). 2021-08-03 14:09:56 -07:00
error_reports.py E2E framework: Add support for list/dict/scalar values 2021-08-11 10:55:43 -07:00
non_tensor_values.py E2E framework: Add support for list/dict/scalar values 2021-08-11 10:55:43 -07:00
submodule.py Add E2E support for tests with heavy dependencies (heavydep tests). 2021-08-03 14:09:56 -07:00

README.md

This directory is for testing the e2e_test framework itself. It is not for holding e2e tests themselves!!!