diff --git a/functorch/csrc/BatchRulesBinaryOps.cpp b/functorch/csrc/BatchRulesBinaryOps.cpp index 2f5e9ae30..7367f43a7 100644 --- a/functorch/csrc/BatchRulesBinaryOps.cpp +++ b/functorch/csrc/BatchRulesBinaryOps.cpp @@ -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); diff --git a/functorch/csrc/BatchRulesViews.cpp b/functorch/csrc/BatchRulesViews.cpp index faffec33e..1b85dd632 100644 --- a/functorch/csrc/BatchRulesViews.cpp +++ b/functorch/csrc/BatchRulesViews.cpp @@ -478,7 +478,6 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) { VMAP_SUPPORT("view", view_batching_rule); VMAP_SUPPORT("expand", expand_batch_rule); VMAP_SUPPORT("unfold", unfold_batch_rule); - VMAP_SUPPORT("movedim.intlist", movedim_batch_rule); } }} diff --git a/functorch/csrc/BatchingRegistrations.cpp b/functorch/csrc/BatchingRegistrations.cpp index 02f6cef3b..1b92543a7 100644 --- a/functorch/csrc/BatchingRegistrations.cpp +++ b/functorch/csrc/BatchingRegistrations.cpp @@ -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, ...) \ diff --git a/test/test_ops.py b/test/test_ops.py index a9f0d49e4..5a4e6aa7c 100644 --- a/test/test_ops.py +++ b/test/test_ops.py @@ -306,7 +306,6 @@ def vjp_of_vjp(*args_and_cotangents): self.assertEqual(loop_out, batched_out, atol=1e-4, rtol=1e-4) vmapvjp_fail = vjp_fail.union({ # All of the following are bugs and need to be fixed - xfail('clamp', ''), xfail('diag_embed'), xfail('eig'), xfail('nn.functional.conv_transpose2d'),