mirror of https://github.com/llvm/torch-mlir
c4e4a11e3f
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. |
||
---|---|---|
.. | ||
acap_dispatch.cpp | ||
acap_dispatch.h | ||
debug.cpp | ||
debug.h | ||
func_builder.cpp | ||
func_builder.h | ||
graph_importer.cpp | ||
graph_importer.h | ||
ivalue_importer.cpp | ||
ivalue_importer.h | ||
mlir_utils.h | ||
module_builder.cpp | ||
module_builder.h | ||
node_importer.cpp | ||
node_importer.h | ||
op_builder.cpp | ||
op_builder.h | ||
python_bindings.cpp | ||
torch_to_mlir_utils.cpp | ||
torch_to_mlir_utils.h |