remove unused

This commit is contained in:
Seunghoon Lee
2024-05-17 10:07:56 +09:00
parent abe601168e
commit 5e541b6ba7
-10
View File
@@ -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)