mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Windows Dynamo Error Removal CI Check (#115969)
Rebase of #111313 onto `main`, for CI validation Co-authored-by: Stella Laurenzo <stellaraccident@gmail.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/115969 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
0827510fd3
commit
45e7af5818
@ -423,6 +423,22 @@ def skipIfNoDynamoSupport(fn):
|
||||
fn(*args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
def skipIfNoInductorSupport(fn):
|
||||
reason = "inductor doesn't support."
|
||||
if isinstance(fn, type):
|
||||
if not torchdynamo.is_inductor_supported():
|
||||
fn.__unittest_skip__ = True
|
||||
fn.__unittest_skip_why__ = reason
|
||||
return fn
|
||||
|
||||
@functools.wraps(fn)
|
||||
def wrapper(*args, **kwargs):
|
||||
if not torchdynamo.is_inductor_supported():
|
||||
raise unittest.SkipTest(reason)
|
||||
else:
|
||||
fn(*args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
try:
|
||||
import torchvision # noqa: F401
|
||||
HAS_TORCHVISION = True
|
||||
|
Reference in New Issue
Block a user