Remove error anti-pattern when dealing with dynamic shape output (#121681)
Summary:
There are cases where capture_dynamic_output_shape_ops=True and we will still see DynamicOutputShapeException. For example, when an op doesn't have a meta kernel implemented to return the correct dynamic shape output. If we blindly give users instructions to set capture_dynamic_output_shape_ops to True, users would try it and see no change. As witnessed in this issue:
https://github.com/pytorch/pytorch/issues/121036#issuecomment-1985221435
X-link: https://github.com/pytorch/pytorch/pull/121681
Approved by: https://github.com/tugsbayasgalan
Reviewed By: osalpekar
Differential Revision: D54919382
Pulled By: gmagogsfm
fbshipit-source-id: 9d022c13a22a4201f26afec844a822467a63d71e