Skip to content

Commit

Permalink
adding some operations for clip to fix failing tests in clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Padarn committed Oct 26, 2021
1 parent c9a3419 commit 213b72b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions functorch/csrc/BatchRulesBinaryOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) {
UNARY_POINTWISE(clamp_max);
POINTWISE_BOXED(clamp_max_);

UNARY_POINTWISE(clip);
POINTWISE_BOXED(clip.Tensor);

// Commented out so we have a test op
// BINARY_SCALAR_2(copysign, Tensor, Scalar);
BINARY_SCALAR_2(div, Tensor, Scalar);
Expand Down
1 change: 0 additions & 1 deletion functorch/csrc/BatchingRegistrations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) {
m.impl("view_as", native::view_as); // composite wrt autograd

m.impl("addmm", addmm_batching_rule);
// clamp operations

// unary pointwise, out-of-place, no additional arguments.
#define TO_BATCHING_RULE(name, ...) \
Expand Down

0 comments on commit 213b72b

Please sign in to comment.