[ONNX] Fix controlflow shape inference with contrib op (#60707) (#62762)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62762
`ONNXShapeTypeInference` for node `n` is skipped if `n` is non ONNX namespace, or if `n` contains any non ONNX namespace nodes. This prevents controlflow nodes containing contrib ops from running `SpecialPostProcess`, which sets up correct node output shape/type information in rare cases.
This PR depends on opset 14 export https://github.com/pytorch/pytorch/pull/59486
Test Plan: Imported from OSS
Reviewed By: SplitInfinity
Differential Revision: D30375180
Pulled By: msaroufim
fbshipit-source-id: 5deacec39f091deb4d75ddd9e660e12fca7f16c5
Co-authored-by: BowenBao <bowbao@microsoft.com>