torch-mlir/frontends/pytorch/csrc/builder
Sean Silva 158c5c484d Implement GlobalizeObjectGraph transformation.
This required restructuring of how we model TorchScript on import. The
main difference is that now we split out a `torch.class_type` that holds
methods and declarations of the types of each slot. This is more
consistent with TorchScript (our previous representation was
"denormalized").

Recommended reading order:
1. check out the description of `torch.class_type` in `TorchOps.td` and
   look at `test/Dialect/Torch/ops.mlir` and
   `frontends/pytorch/test/module_import/` to familiarize with the new
   representation.
   - Just look at the new IR. The diff between the old names and new
     names is confusing.
2. check out `test/Dialect/Torch/globalize-object-graph*.mlir`
   and read along with the pass description in
   `include/npcomp/Dialect/Torch/Transforms/Passes.td`
3. Read the code in `GlobalizeObjectGraph.cpp` and miscellaneous changes
   in `ivalue_importer.cpp`, `TorchOps.cpp`, etc.
2021-02-18 18:18:47 -08:00
..
acap_dispatch.cpp adapt acap_dispatch to latest pytorch nightly ("1.9.0.dev20210215+cpu") 2021-02-18 11:13:29 -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 support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
func_builder.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
graph_importer.cpp Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
graph_importer.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
ivalue_importer.cpp Implement GlobalizeObjectGraph transformation. 2021-02-18 18:18:47 -08:00
ivalue_importer.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
mlir_utils.h Handle object identity correctly. 2021-02-10 15:15:56 -08:00
module_builder.cpp Add MLIR diagnostic handler that prints to `sys.stderr`. 2021-02-17 18:50:05 -08:00
module_builder.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
node_importer.cpp Add prim::Print and fix prim::CallMethod 2021-02-10 15:15:56 -08:00
node_importer.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
op_builder.cpp Add prim::Print and fix prim::CallMethod 2021-02-10 15:15:56 -08:00
op_builder.h Add prim::Print and fix prim::CallMethod 2021-02-10 15:15:56 -08:00
python_bindings.cpp Add TorchScript graph importer. 2020-11-23 14:20:09 -08:00
torch_to_mlir_utils.cpp Implement GlobalizeObjectGraph transformation. 2021-02-18 18:18:47 -08:00
torch_to_mlir_utils.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00