Fix cat forward-AD tests (#99596)
Fixes #94115
Not sure where to add the test. There is an existing sample input but apparently doesn't fail any test.
https://github.com/pytorch/pytorch/blob/6580b160d35a75d5ceebf376d55422376d0c0d2c/torch/testing/_internal/common_methods_invocations.py#L2043
Edited: Found the skipper and xfailed some failures, which are pre-existing and unrelated to the fix in question. (Those failures are of gradgrad check, while the fix is of forward-AD).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99596
Approved by: https://github.com/soulitzer