[ONNX] 'Transform' as base class for passes (#95935)
Base class `Transform` provides basic diagnostics functionality. Diagnostics
are automatically recorded for inherited passes.
New base class `Pass` will be added when `analysis` is introduced.
Example diagnostics for `test_mnist`:
Decompose:
<img src="https://user-images.githubusercontent.com/9376104/222615465-689e76eb-6b30-4670-aed5-a0d419583bfe.png" width="80%" height="80%">
Shape inference:
<img src="https://user-images.githubusercontent.com/9376104/222615527-0484e504-f9d5-4f5c-b018-3e45ef15c138.png" width="80%" height="80%">
Moving placeholders:
<img src="https://user-images.githubusercontent.com/9376104/222852379-36caf263-6965-4e5d-9dce-f63075a3812f.png" width="80%" height="80%">
Pull Request resolved: https://github.com/pytorch/pytorch/pull/95935
Approved by: https://github.com/justinchuby