Skip to content

Commit b5cf706

Browse files
committed
Removing unnecessary else's
1 parent 4a05df3 commit b5cf706

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bitsandbytes/functional.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ def get_instance(cls):
133133
def create_linear_map(signed=True):
134134
if signed:
135135
return torch.linspace(-1.0, 1.0, 256)
136-
else:
137-
return torch.linspace(0.0, 1.0, 256)
136+
return torch.linspace(0.0, 1.0, 256)
138137

139138

140139
def create_dynamic_map(signed=True, n=7):
@@ -186,13 +185,12 @@ def create_dynamic_map(signed=True, n=7):
186185

187186
def get_special_format_str():
188187
if not torch.cuda.is_available(): return 'col_turing'
189-
major, minor = torch.cuda.get_device_capability()
188+
major, _minor = torch.cuda.get_device_capability()
190189
if major <= 7:
191190
return "col_turing"
192-
elif major == 8:
191+
if major == 8:
193192
return "col_ampere"
194-
else:
195-
return "col_turing"
193+
return "col_turing"
196194

197195

198196

0 commit comments

Comments
 (0)