From 5e541b6ba7c95cf0bce5abecd32db2caadc15ccc Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Fri, 17 May 2024 10:07:56 +0900 Subject: [PATCH] remove unused --- modules/zluda.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/zluda.py b/modules/zluda.py index c679feeaa..a1b5fb1f8 100644 --- a/modules/zluda.py +++ b/modules/zluda.py @@ -8,14 +8,6 @@ from modules import shared, devices do_nothing = lambda _: None # pylint: disable=unnecessary-lambda-assignment -conv2d = torch.nn.functional.conv2d -def conv2d_cudnn_disabled(*args, **kwargs): - torch.backends.cudnn.enabled = False - R = conv2d(*args, **kwargs) - torch.backends.cudnn.enabled = True - return R - - def is_zluda(device: DeviceLikeType): device = torch.device(device) return torch.cuda.get_device_name(device).endswith("[ZLUDA]") @@ -46,8 +38,6 @@ def initialize_zluda(): torch.backends.cuda.enable_cudnn_sdp(shared.cmd_opts.use_zluda_dnn and shared.cmd_opts.experimental) torch.backends.cuda.enable_cudnn_sdp = do_nothing shared.opts.sdp_options = ['Math attention'] - if shared.cmd_opts.use_zluda_dnn and not shared.cmd_opts.experimental: - torch.nn.functional.conv2d = conv2d_cudnn_disabled devices.device_codeformer = devices.cpu result = test(device)