refactor mul and add constraints for fields (#81274)
support element-wise multiplication and add constraints for fields (when op.target is get_attr)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81274
Approved by: https://github.com/jamesr66a