Skip to content

Commit

Permalink
Revert D26009829: Optimize relu on cpu using clamp_min
Browse files Browse the repository at this point in the history
Test Plan: revert-hammer

Differential Revision:
D26009829 (2054cd5)

Original commit changeset: 7bb1583ffb3e

fbshipit-source-id: 3e945b438fb8d83f721e400ae69be8848cab9720
  • Loading branch information
albanD authored and facebook-github-bot committed Feb 5, 2021
1 parent 50c9c08 commit 430329e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aten/src/ATen/native/Activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ Tensor hardswish_backward(const Tensor& grad_output, const Tensor& self) {
}

Tensor relu(const Tensor & self) {
return at::clamp_min(self, 0);
return at::threshold(self, 0, 0);
}

Tensor & relu_(Tensor & self) {
return at::clamp_min_(self, 0);
return at::threshold_(self, 0, 0);
}

Tensor selu(const Tensor & self) {
Expand Down

0 comments on commit 430329e

Please sign in to comment.