mirror of https://github.com/llvm/torch-mlir
bfc3ee35c6
This includes the following changes to import MT model into MLIR. There are still a lot of work to for actual compilation. - Add `torch.dict<>`, `torch.any`, `torch.number` types - Add `torch.prim.DictConstruct` op - Fix `torch.prim.TupleConstruct` op assembly format to include resulting types |
||
---|---|---|
.. | ||
README.md | ||
debug-info.py | ||
dict.py | ||
elif.py | ||
errors.py | ||
function-derefine.py | ||
if.py | ||
list.py | ||
loop.py | ||
prim.py | ||
tuple.py | ||
types-bool.py | ||
types-none.py |
README.md
node_import
Most of the tests in this directory test the importing of TorchScript
torch::jit::Graph
's.
However, TorchScript graphs don't really correspond directly to anything on
the MLIR side. They are 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.
torch::jit::Node
==mlir::Operation
,torch::jit::Block
==mlir::Region
containing singlemlir::Block
Hence the name of this directory and the corresponding code in node_importer.h/cpp.