Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fixing clamp tests #225

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/BatchRulesViews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}}
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
1 change: 0 additions & 1 deletion test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down