import torch
import logging


def get_device() -> torch.device:
    """Gets device to use for PyTorch.

    Returns:
        Device.
    """
    use_cuda = torch.cuda.is_available()
    device = torch.device("cuda" if use_cuda else "cpu")
    logging.info("Model device: %s", device)
    return device