import torch


def isValidDevice(device: str):
    """Checks if a given device is valid for torch

    Args:
        device (str): Device to check
    """
    try:
        torch.device(device)
        return True
    except:
        return False