Skip to content

Commit

Permalink
[fbsync] Added support for tv tensors in torch compile for func ops (#…
Browse files Browse the repository at this point in the history
…8110)

Summary: Co-authored-by: Nicolas Hug <[email protected]>

Reviewed By: vmoens

Differential Revision: D51391968

fbshipit-source-id: 90b6b67404f5faac9ff4effcf3d839f77fc9f7b1
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Nov 16, 2023
1 parent 0f588e4 commit 856e7cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions torchvision/tv_tensors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
from ._video import Video


# TODO: Fix this. We skip this method as it leads to
# RecursionError: maximum recursion depth exceeded while calling a Python object
# Until `disable` is removed, there will be graph breaks after all calls to functional transforms
@torch.compiler.disable
def wrap(wrappee, *, like, **kwargs):
"""[BETA] Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.tv_tensors.TVTensor` subclass as ``like``.
Expand Down

0 comments on commit 856e7cf

Please sign in to comment.