returnn
returnn copied to clipboard
RF backend: PyTorch code
For debugging, for dumping, but also as an alternative to torch.compile
-support for the direct PyTorch backend (#1491), it could be useful to have another backend which outputs PyTorch code, instead of directly executing it (or maybe it could do both, similar to PyTorch tracing, but maybe more clever).
This would behave more like a graph-based backend.
Instead of implementing this backend "by hand", maybe this can automatically be done based on the existing PyTorch backend? Actually this is probably only really feasible if we can do it this way, otherwise it would maybe be too much overhead.