Add ref for relu6, fixes hardshrink and improves testing of related ops (#81142)
This PR:
- Adds ref for relu6 and makes its OpInfo a UnaryUfuncInfo
- Correct hardshrink ref when lambd < 0 and when inputs are nan
- Corrected nan behavior vectorized implementation of hardshrink (fixes https://github.com/pytorch/pytorch/issues/81138)
- Make OpInfos for {hard,soft}shrink, hardtanh UnaryUfuncInfos and add error_inputs for softshrink
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81142
Approved by: https://github.com/Lezcano, https://github.com/ngimel, https://github.com/mruberry