Catch 16xx cards without the NVIDIA name in them

This commit is contained in:
cmdr2 2022-09-11 11:10:54 +05:30
parent 1d4b34c0dd
commit fec21f1208

View File

@ -60,7 +60,7 @@ try:
gpu_name = torch.cuda.get_device_name(torch.cuda.current_device()) gpu_name = torch.cuda.get_device_name(torch.cuda.current_device())
print('detected: ', gpu_name) print('detected: ', gpu_name)
has_valid_gpu = True has_valid_gpu = True
force_full_precision = ('nvidia' in gpu_name.lower()) and ('1660' in gpu_name or ' 1650' in gpu_name) # otherwise these NVIDIA cards create green images force_full_precision = ('nvidia' in gpu_name.lower() or 'geforce' in gpu_name.lower()) and (' 1660' in gpu_name or ' 1650' in gpu_name) # otherwise these NVIDIA cards create green images
if force_full_precision: if force_full_precision:
print('forcing full precision on NVIDIA 16xx cards, to avoid green images. GPU detected: ', gpu_name) print('forcing full precision on NVIDIA 16xx cards, to avoid green images. GPU detected: ', gpu_name)
except: except: