Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 715c44e

Browse files
committed
accounted for l1_loss now being a composite op
1 parent c2e72cc commit 715c44e

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

functorch/csrc/BatchRulesDecompositions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ TORCH_LIBRARY_IMPL(aten, FT_BATCHED_KEY, m) {
130130
OP_DECOMPOSE(inner);
131131
OP_DECOMPOSE(instance_norm);
132132
OP_DECOMPOSE(kron);
133+
OP_DECOMPOSE(l1_loss);
133134
OP_DECOMPOSE(layer_norm);
134135
OP_DECOMPOSE2(ldexp, Tensor);
135136
OP_DECOMPOSE2(less_equal, Tensor );

test/test_ops.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ def test_vmapjvpall(self, device, dtype, op):
778778
xfail('fft.ihfftn'), # conj_physical fallback
779779
xfail('istft'), # col2im fallback
780780
xfail('polar'), # complex fallback
781-
xfail('nn.functional.l1_loss', ''),
782781
xfail('nn.functional.max_unpool3d', 'grad'),
783782
xfail('nn.functional.smooth_l1_loss', ''),
784783
xfail('nn.functional.max_unpool2d', 'grad'),
@@ -911,7 +910,6 @@ def test():
911910
xfail('nn.functional.soft_margin_loss', ''),
912911
xfail('scatter_reduce', 'amin'),
913912
xfail('nn.functional.max_unpool1d', 'grad'),
914-
xfail('nn.functional.l1_loss', ''),
915913
xfail('nn.functional.max_unpool2d', 'grad'),
916914
xfail('qr'),
917915
xfail('linalg.eigvalsh'), # _linalg_eigh doesn't have batching rule

test/test_vmap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3267,7 +3267,6 @@ def test_vmap_exhaustive(self, device, dtype, op):
32673267
xfail('nn.functional.triplet_margin_loss', ''),
32683268
xfail('nn.functional.pdist', ''),
32693269
xfail('scatter_reduce', 'sum'),
3270-
xfail('nn.functional.l1_loss', ''),
32713270
xfail('nn.functional.smooth_l1_loss', ''),
32723271
xfail('scatter_reduce', 'amax'),
32733272
xfail('nn.functional.max_unpool1d', 'grad'),

0 commit comments

Comments
 (0)