ONNX interpreter using PyTorch as a backend

Does anybody know of a ONNX interpreter using PyTorch as backend:

  • e.g. this could be very naive interpreting graph nodes iteratively
  • or it could also do some graph transformation from ONNX graph to FX graph or sth like that
  • or it could consume ONNX graph and produce some sort of Python code (similar to FX graphs / ExportedProgram) executable and eager-debuggable with Python/PyTorch

All these modes are useful in practice for educational purposes (debugging/understanding) and also as a baseline (e.g. in context of tensorrt/polygraphy which benchmarks ORT versus TRT, but could also benchmark against some sorts of baseline PyTorch-powered interpreters) - especially if the ONNX file is coming from some third party / exporter.

If I understand correctly, at some point Caffe2 was filling this job, but I’m curious if anything like this exists for modern PyTorch