Update model_management.py

This commit is contained in:
patientx 2024-09-05 00:05:54 +03:00 committed by GitHub
parent 1b7b7ad6f1
commit 894c727ce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -275,19 +275,17 @@ try:
if "[ZLUDA]" in torch_device_name:
print(" ")
print("***----------------------ZLUDA--------------------------***")
print(" :: ZLUDA detected, disabling non-supported functions.")
if torch.backends.cudnn.enabled:
torch.backends.cudnn.enabled = False
print(" :: cuDNN , flash_sdp , mem_efficient_sdp disabled")
torch.backends.cudnn.enabled = False
print(" :: (cuDNN, flash_sdp, mem_efficient_sdp disabled) ")
torch.backends.cuda.enable_flash_sdp(False)
torch.backends.cuda.enable_math_sdp(True)
torch.backends.cuda.enable_mem_efficient_sdp(False)
print("***-----------------------------------------------------***")
print("Device:", torch_device_name)
print(" :: Device:", torch_device_name)
print(" ")
except:
print("Could not pick default device.")