mirror of https://github.com/llvm/torch-mlir
3a890aa26c
- Move frontend lowering pipelines to c++ (this helps with reproducing failures in npcomp-opt) - Add debugging printouts when compilation fails on RefBackendTestConfig The experience now when a test fails during MLIR lowering is now like this: ``` NPCOMP TorchScript Object Graph IR -> NPCOMP Backend IR lowering failed with the following diagnostics: failed to legalize operation 'torch.global_slot' Module does not conform to npcomp's backend contract. See dialect conversion legality information above. Error can be reproduced with: $ npcomp-opt -torchscript-to-npcomp-backend-pipeline /tmp/ResNet18Module.mlir ``` And when TorchScript->MLIR import fails it looks like this: ``` PyTorch TorchScript module -> NPCOMP Object Graph IR import failed with the following diagnostics: unhandled prim operation: %18 : int = prim::min(%17) # /usr/local/google/home/silvasean/.local/lib/python3.9/site-packages/torch/nn/functional.py:4532:4 ``` Also, - Add `--filter=<regex>` to e2e test harness to filter tests. - Add a few prim ops that were needed to import ResNet18 - Fix torch.prim.Loop.condition assemblyFormat (it previously would not round-trip in the case of no loop-carried variables) |
||
---|---|---|
.. | ||
acap_dispatch.cpp | ||
acap_dispatch.h | ||
class_annotator.cpp | ||
class_annotator.h | ||
debug.cpp | ||
debug.h | ||
func_builder.cpp | ||
func_builder.h | ||
function_importer.cpp | ||
function_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 |