Skip to content

Commit

Permalink
[torch_xla2] Enable Background_Matting model by implement `aten::upsa…
Browse files Browse the repository at this point in the history
…mple_bilinear2d` (#8304)
  • Loading branch information
ManfeiBai authored Oct 24, 2024
1 parent 5a4d7b4 commit 2f5dc1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ def repeat_interleave(repeats, dim=0):
return jnp.repeat(jnp.arange(repeats.shape[dim]), repeats)


# aten.upsample_bilinear2d
@op(torch.ops.aten.upsample_bilinear2d)
def _aten_upsample_bilinear2d(x, output_size, align_corners=False, scale_h=None, scale_w=None):
return _aten_upsample_bilinear2d_aa(x, output_size=output_size, align_corners=align_corners, scale_factors=None, scales_h=scale_h, scales_w=scale_w)


@op(torch.ops.aten.view_as_real)
def _aten_view_as_real(x):
real = jnp.real(x)
Expand Down

0 comments on commit 2f5dc1f

Please sign in to comment.