File indexing completed on 2024-05-19 08:43:40
0001 #!/usr/bin/env python3 0002 # SPDX-FileCopyrightText: 2023 Jean-Baptiste Mardelle <jb@kdenlive.org> 0003 # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 import sys 0006 import subprocess 0007 import torch 0008 0009 if torch.cuda.is_available() and torch.cuda.device_count() > 0: 0010 for i in range(torch.cuda.device_count()): 0011 print ('cuda:' + str(i) + '#' + torch.cuda.get_device_name(i)) 0012 0013 print ('cpu') 0014 0015