Skip to content
Closed
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
8 changes: 8 additions & 0 deletions torch/testing/_internal/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,14 @@ def __torch_function__(self, func, types, args=(), kwargs=None):
torch._inductor.config.fallback_random = True


def xpassIfTorchDynamo(func):
return func if TEST_WITH_TORCHDYNAMO else unittest.expectedFailure(func)


def xfailIfTorchDynamo(func):
return unittest.expectedFailure(func) if TEST_WITH_TORCHDYNAMO else func


def skipIfTorchDynamo(msg="test doesn't currently work with dynamo"):
def decorator(fn):
if not isinstance(fn, type):
Expand Down