mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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
This commit is contained in:
committed by
PyTorch MergeBot
parent
3a4343afc5
commit
1231194dd3
@ -59,6 +59,7 @@ METAL_SOURCE_LIST = [
|
||||
"aten/src/ATen/native/metal/ops/MetalConvolution.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalCopy.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalHardswish.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalHardshrink.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalLeakyReLU.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalNeurons.mm",
|
||||
"aten/src/ATen/native/metal/ops/MetalPadding.mm",
|
||||
|
Reference in New Issue
Block a user