Skip to content

Commit

Permalink
Merge pull request #168 from deiteris/fixes-2
Browse files Browse the repository at this point in the history
Fix FP16 detection by CUDA capability and exclude 900MX series explicitly
  • Loading branch information
deiteris authored Aug 11, 2024
2 parents 958a25f + 55a9e75 commit edd2341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/voice_changer/common/deviceManager/DeviceManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def is_fp16_available(self):
# All Radeon GPUs starting from GCN 1 (Radeon HD 7000 series and later) reportedly have 2:1 FP16 performance
# Intel UHD Graphics 600 and later reportedly have 2:1 FP16 performance
# All Intel Arc GPUs reportedly have 2:1 FP16 performance or better
ignored_nvidia_gpu = re.search(r'((GTX|RTX|TESLA|QUADRO) (V100|[789]\d{2}|1[06]\d{2}|P40|TITAN)|MX\d{3})', device_name_uppercase)
ignored_nvidia_gpu = re.search(r'((GTX|RTX|TESLA|QUADRO) (V100|[789]\d{2}|1[06]\d{2}|P40|TITAN)|MX\d{3}|\d{3}MX)', device_name_uppercase)
if ignored_nvidia_gpu is not None:
return False

Expand All @@ -174,7 +174,7 @@ def is_fp16_available(self):
if ignored_intel_gpu:
return False

if self.device == 'cuda':
if self.device.type == 'cuda':
major, _ = torch.cuda.get_device_capability(self.device)
if major < 7: # コンピューティング機能が7以上の場合half precisionが使えるとされている(が例外がある?T500とか)
return False
Expand Down

0 comments on commit edd2341

Please sign in to comment.