Skip to content

Commit adca88e

Browse files
Ailing Zhangfacebook-github-bot
authored andcommitted
Fix hardsigmoid/hardswish for proper device dispatch. (#36704)
Summary: #36351 make `hardsigmoid_backward` use tensoriterator but that can be done only after proper device dispatch. Pull Request resolved: #36704 Differential Revision: D21068126 Pulled By: ailzhang fbshipit-source-id: 6a6a74216f2b50fa7d15f692cd1583d3d233580a
1 parent 9df9aef commit adca88e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

aten/src/ATen/native/native_functions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5687,6 +5687,9 @@
56875687
- func: hardsigmoid_backward(Tensor grad_output, Tensor self) -> Tensor
56885688
use_c10_dispatcher: full
56895689
python_module: nn
5690+
dispatch:
5691+
CPU: hardsigmoid_backward
5692+
CUDA: hardsigmoid_backward
56905693

56915694
- func: hardtanh.out(Tensor self, Scalar min_val=-1, Scalar max_val=1, *, Tensor(a!) out) -> Tensor(a!)
56925695
python_module: nn
@@ -5738,6 +5741,9 @@
57385741
- func: hardswish_backward(Tensor grad_output, Tensor self) -> Tensor
57395742
use_c10_dispatcher: full
57405743
python_module: nn
5744+
dispatch:
5745+
CPU: hardswish_backward
5746+
CUDA: hardswish_backward
57415747

57425748
- func: leaky_relu.out(Tensor self, Scalar negative_slope=0.01, *, Tensor(a!) out) -> Tensor(a!)
57435749
python_module: nn

0 commit comments

Comments
 (0)