test/test_c10d.py
def skip_if_not_nccl(func):
    """Skips a test if NCCL is not available (for c10d)."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        if hasattr(c10d, "ProcessGroupNCCL"):
            return func(*args, **kwargs)
        sys.exit(TEST_SKIPS['nccl'].exit_code)

    return wrapper
Skips a test if NCCL is not available (for c10d).
Skips a test if NCCL is not available (for c10d).
Skips a test if NCCL is not available ( for c10d ) .
def skip_if_not_nccl(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        if hasattr(c10d, "ProcessGroupNCCL"):
            return func(*args, **kwargs)
        sys.exit(TEST_SKIPS['nccl'].exit_code)
    return wrapper
def skip_if_not_nccl ( func ) : @ wraps ( func ) def wrapper ( * args , ** kwargs ) : if hasattr ( c10d , "ProcessGroupNCCL" ) : return func ( * args , ** kwargs ) sys . exit ( TEST_SKIPS [ 'nccl' ] . exit_code ) return wrapper
Skips a test if NCCL is not available (for c10d).
Skips a test if NCCL is not available ( for c10d ) .
"""Skips a test if NCCL is not available (for c10d)."""
func