zluda fix old cards

This commit is contained in:
Seunghoon Lee
2025-05-09 20:01:53 +09:00
parent 9b641becd5
commit a27abf7363
+5 -2
View File
@@ -34,8 +34,11 @@ def initialize_zluda():
do_hijack()
torch.backends.cudnn.enabled = zluda_installer.MIOpen_enabled
if not zluda_installer.MIOpen_enabled:
torch.backends.cuda.enable_cudnn_sdp(False)
if hasattr(torch.backends.cuda, "enable_cudnn_sdp"):
if not zluda_installer.MIOpen_enabled:
torch.backends.cuda.enable_cudnn_sdp(False)
torch.backends.cuda.enable_cudnn_sdp = do_nothing
else:
torch.backends.cuda.enable_cudnn_sdp = do_nothing
torch.backends.cuda.enable_flash_sdp(False)
torch.backends.cuda.enable_flash_sdp = torch.backends.cuda.enable_cudnn_sdp