[ONNX] Test and address autograd.func (FusedLayerNorm) shape inference (#81931)
This PR addresses the ONNX exporter issue of wrongly inferred static shape by unreliable nodes:
1. Specifically, this unblocks the usage of apex `FusedLayerNorm` (autograd.function) in transformer. Before this PR, the downstream nodes of apex `FusedLayerNorm` are inferred with static shape even though they are unreliable (should be dynamic).
2. Add a general test case using autograd function to wrap `torch.nn.layernorm` which can repro the same issue as apex `FusedLayerNorm` did in transformers-embedding layer.
3. Remove a legacy test `test_empty_like_opset7` which still uses deprecated ConstantFill op. As this node is not supported by onnx (checker) anymore, the output of its shape inference leading to unexpected outcome, and is exposed by this PR.
```python
Warning: Checker does not support models with experimental ops: ConstantFill
```
Please advise if there is a better place for the test case.
Fixes #82330
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81931
Approved by: https://github.com/justinchuby, https://github.com/BowenBao