torch-mlir/frontends/pytorch/test/node_import
Yi Zhang e0ff5248fb Add TorchList type and prim::ListConstruct #218 2021-06-10 14:31:35 -07:00
..
README.md Rename tests to match the code they test 2021-02-25 13:31:33 -08:00
debug-info.py Properly model "derefinement". 2021-03-03 15:09:44 -08:00
elif.py Properly model "derefinement". 2021-03-03 15:09:44 -08:00
errors.py Properly model "derefinement". 2021-03-03 15:09:44 -08:00
function-derefine.py Add basic MLP's to the e2e curriculum. 2021-04-27 12:18:54 -07:00
if.py Significantly restructure torch/aten import design. 2021-05-19 13:37:39 -07:00
list.py Add TorchList type and prim::ListConstruct #218 2021-06-10 14:31:35 -07:00
loop.py Significantly restructure torch/aten import design. 2021-05-19 13:37:39 -07:00
prim.py Add TorchList type and prim::ListConstruct #218 2021-06-10 14:31:35 -07:00
tuple.py Introduce `!torch.tensor` / `!torch.vtensor` types. 2021-06-10 10:56:48 -07:00
types-bool.py Properly model "derefinement". 2021-03-03 15:09:44 -08:00
types-none.py Properly model "derefinement". 2021-03-03 15:09:44 -08:00

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 single mlir::Block

Hence the name of this directory and the corresponding code in node_importer.h/cpp.