Removing unnecessary else's

This commit is contained in:
Tom Aarsen 2022-10-27 13:25:07 +02:00
parent 4a05df34c2
commit b5cf706341

View File

@ -133,7 +133,6 @@ class Cusparse_Context:
def create_linear_map(signed=True):
if signed:
return torch.linspace(-1.0, 1.0, 256)
else:
return torch.linspace(0.0, 1.0, 256)
@ -186,12 +185,11 @@ def create_dynamic_map(signed=True, n=7):
def get_special_format_str():
if not torch.cuda.is_available(): return 'col_turing'
major, minor = torch.cuda.get_device_capability()
major, _minor = torch.cuda.get_device_capability()
if major <= 7:
return "col_turing"
elif major == 8:
if major == 8:
return "col_ampere"
else:
return "col_turing"