torch-mlir/frontends/pytorch/csrc/builder
Sean Silva c4e4a11e3f Add support for prim::GetAttr/SetAttr/CallMethod/If
This required some invasive surgery to graph_importer.h/cpp,
specifically moving most of it into node_importer.h/cpp and relayering
it. The abstraction that it had didn't work well in the recursive
setting that happens with prim::If.

The key observation is that torch::jit::Graph doesn't really correspond
directly to anything on the MLIR side. It's a weird combination of a
context, builder, and function and just holds a `torch::jit::Block`. It
is `torch::jit::Node` and `torch::jit::Block` which form the recursive
structure analogous to MLIR's operation/region/block. So
node_importer.h/cpp makes sense as a core building block.

As part of doing this, I did venture a bit into the AcapController code,
and realize now that there is functionality duplicated there with the
ivalue importer. Will refactor that soon.
2021-02-04 17:01:47 -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 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 Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
ivalue_importer.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
mlir_utils.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
module_builder.cpp Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
module_builder.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
node_importer.cpp Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -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 support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
op_builder.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
python_bindings.cpp Add TorchScript graph importer. 2020-11-23 14:20:09 -08:00
torch_to_mlir_utils.cpp Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00
torch_to_mlir_utils.h Add support for prim::GetAttr/SetAttr/CallMethod/If 2021-02-04 17:01:47 -08:00