torch-mlir/frontends/pytorch/csrc/builder
Sean Silva 689b40c7a6 Add initial TorchScript module importer
It turns out that this was easiest to structure as a general IValue
importer, since torch module are just one of the possible IValue's.

We import the IValue object graph in a braindead fashion into basicpy
ops and a new `torch.nn_module` op that is used to model the
attributes/methods of a torch::jit::Module IValue. See `Torch/ops.mlir`
for an example, and also check out the .py import tests in
`frontends/pytorch/test/module_import`.

As part of this change, a few housekeeping tasks:
- extract some helpers from graph_importer.cpp
- more helpers around the C API
- misc touchups
2021-01-28 11:55:17 -08:00
..
acap_dispatch.cpp Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
acap_dispatch.h Make torch_mlir compatible with binary PyTorch installations. 2020-12-14 09:51:00 -08:00
debug.cpp Delete old PyTorch 1.3 type dispatch oriented code paths. 2020-11-12 22:27:05 -08:00
debug.h Delete old PyTorch 1.3 type dispatch oriented code paths. 2020-11-12 22:27:05 -08:00
func_builder.cpp Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
func_builder.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
graph_importer.cpp Make torch_mlir compatible with binary PyTorch installations. 2020-12-14 09:51:00 -08:00
graph_importer.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
ivalue_importer.cpp Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
ivalue_importer.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
mlir_utils.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
module_builder.cpp Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
module_builder.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
python_bindings.cpp Add TorchScript graph importer. 2020-11-23 14:20:09 -08:00
torch_to_mlir_utils.cpp Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
torch_to_mlir_utils.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00