Skip to content

Commit

Permalink
Addressed CR and fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 committed May 23, 2023
1 parent 9a728ab commit 46b3cb8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions test/expect/HasDecompTest.test_has_decomposition.expect
Original file line number Diff line number Diff line change
Expand Up @@ -1158,8 +1158,6 @@ aten::slow_conv_transpose2d
aten::slow_conv_transpose2d.out
aten::slow_conv_transpose3d
aten::slow_conv_transpose3d.out
aten::smooth_l1_loss
aten::smooth_l1_loss.out
aten::softmax.int_out
aten::sort
aten::sort.stable
Expand Down
1 change: 0 additions & 1 deletion test/functorch/test_aotdispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2803,7 +2803,6 @@ def forward(self, x):
xfail('nn.functional.pixel_shuffle', ''), # aten.pixel_shuffle.default - couldn't find symbolic meta fun...
xfail('nn.functional.pixel_unshuffle', ''), # aten.pixel_unshuffle.default - couldn't find symbolic meta...
xfail('nn.functional.rrelu', ''), # aten.rrelu_with_noise.default - couldn't find symbolic meta function...
xfail('nn.functional.smooth_l1_loss', ''), # could not find kernel
xfail('normal', 'number_mean'), # Cannot call sizes() on tensor with symbolic sizes/strides
xfail('ormqr', ''), # aten.ormqr.default - couldn't find symbolic meta function/decomposition
xfail('pinverse', ''), # aten.linalg_pinv.atol_rtol_tensor - couldn't find symbolic meta function/decomp...
Expand Down
1 change: 0 additions & 1 deletion test/test_proxy_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,6 @@ def f(a, b, c, d, e):
xfail('nn.functional.pad', 'replicate'), # aten.replication_pad1d.default - couldn't find symbolic meta function/deco...
xfail('nn.functional.pdist', ''), # Could not run 'aten::_pdist_forward' with arguments from the 'Meta' backend...
xfail('nn.functional.pixel_unshuffle', ''), # aten.pixel_unshuffle.default - couldn't find symbolic meta function/deco...
xfail('nn.functional.smooth_l1_loss', ''), # aten.size.default - couldn't find symbolic meta function/decomposition
xfail('normal', 'number_mean'), # aten.normal.float_Tensor - couldn't find symbolic meta function/decomposition
xfail('ormqr', ''), # aten.ormqr.default - couldn't find symbolic meta function/decomposition
xfail('pinverse', ''), # aten.linalg_pinv.atol_rtol_tensor - couldn't find symbolic meta function/decomposition
Expand Down
6 changes: 5 additions & 1 deletion torch/_refs/nn/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"hinge_embedding_loss",
"huber_loss",
"l1_loss",
"smmooth_l1_loss",
"smooth_l1_loss",
"log_softmax",
"margin_ranking_loss",
"mish",
Expand Down Expand Up @@ -543,6 +543,10 @@ def l1_loss(
return _apply_loss_reduction(loss, reduction)


@elementwise_type_promotion_wrapper(
type_promoting_args=("input", "target"),
type_promotion_kind=ELEMENTWISE_TYPE_PROMOTION_KIND.COMPLEX_TO_FLOAT,
)
def smooth_l1_loss(
input: TensorLikeType,
target: TensorLikeType,
Expand Down

0 comments on commit 46b3cb8

Please sign in to comment.