import torch

_DEVICE = None


def set_device(device):
    global _DEVICE
    _DEVICE = device


def _device():
    global _DEVICE
    if _DEVICE is None:
        _DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    return _DEVICE

86a6d074897c09702e22a605dcb1e7ab375eba8b
<mask token>


def set_device(device):
    global _DEVICE
    _DEVICE = device


<mask token>

<mask token>


def set_device(device):
    global _DEVICE
    _DEVICE = device


def _device():
    global _DEVICE
    if _DEVICE is None:
        _DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu'
            )
    return _DEVICE

<mask token>
_DEVICE = None


def set_device(device):
    global _DEVICE
    _DEVICE = device


def _device():
    global _DEVICE
    if _DEVICE is None:
        _DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu'
            )
    return _DEVICE

import torch
_DEVICE = None


def set_device(device):
    global _DEVICE
    _DEVICE = device


def _device():
    global _DEVICE
    if _DEVICE is None:
        _DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu'
            )
    return _DEVICE

import torch

_DEVICE = None


def set_device(device):
    global _DEVICE
    _DEVICE = device


def _device():
    global _DEVICE
    if _DEVICE is None:
        _DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    return _DEVICE
