Files
kdenlive/data/scripts/checkgpu.py

12 lines
376 B
Python
Executable File

#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2023 Jean-Baptiste Mardelle <jb@kdenlive.org>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import torch
if torch.cuda.is_available() and torch.cuda.device_count() > 0:
for i in range(torch.cuda.device_count()):
print('cuda:' + str(i) + '#' + torch.cuda.get_device_name(i))
print('cpu')