Add hardshrink op to metal backend (#82224)
Summary:
Add hardshrink op's metal implementation to pytorch codebase
Heavily based on already existing Hardswish implementation
Test Plan:
Add two unit tests to compare the result of metal-based hardshrink function to that of the CPU implementation. Both tests pass:
{F755783049}
Differential Revision: D38152454
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82224
Approved by: https://github.com/SS-JIA