parent
6b70ad108e
commit
1ee64b0c36
@ -0,0 +1,10 @@
|
|||||||
|
import torch
|
||||||
|
import sys
|
||||||
|
if torch.cuda.is_available():
|
||||||
|
# 获取可用的GPU数量
|
||||||
|
num_gpus = torch.cuda.device_count()
|
||||||
|
print(f'可用的GPU数量: {num_gpus}')
|
||||||
|
else:
|
||||||
|
print('当前系统没有CUDA支持的GPU')
|
||||||
|
print(torch.version.cuda)
|
||||||
|
print("Python version:", sys.version)
|
Loading…
Reference in new issue