MASAI / app /gpu_init.py
DmitryRyumin's picture
Summary
f16bb9f
raw
history blame
264 Bytes
"""
File: gpu_init.py
Author: Dmitry Ryumin, Maxim Markitantov, Elena Ryumina, Anastasia Dvoynikova, and Alexey Karpov
Description: GPU initialization.
License: MIT License
"""
import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")