Skip to content

Commit 213b72b

Browse files
committed
adding some operations for clip to fix failing tests in clamp
1 parent c9a3419 commit 213b72b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

functorch/csrc/BatchRulesBinaryOps.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) {
183183
UNARY_POINTWISE(clamp_max);
184184
POINTWISE_BOXED(clamp_max_);
185185

186+
UNARY_POINTWISE(clip);
187+
POINTWISE_BOXED(clip.Tensor);
188+
186189
// Commented out so we have a test op
187190
// BINARY_SCALAR_2(copysign, Tensor, Scalar);
188191
BINARY_SCALAR_2(div, Tensor, Scalar);

functorch/csrc/BatchingRegistrations.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,6 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) {
888888
m.impl("view_as", native::view_as); // composite wrt autograd
889889

890890
m.impl("addmm", addmm_batching_rule);
891-
// clamp operations
892891

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

0 commit comments

Comments
 (0)