mirror of
https://invent.kde.org/multimedia/kdenlive
synced 2025-12-05 15:59:59 +01:00
12 lines
376 B
Python
Executable File
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')
|