constraints for transpose (#81516)
Constraints and tests for transpose operation, which is similar to a sequence of two index selects
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81516
Approved by: https://github.com/jansel, https://github.com/jamesr66a, https://github.com/anijain2305