File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ def is_amd():
305
305
logging .info ("AMD arch: {}" .format (arch ))
306
306
logging .info ("ROCm version: {}" .format (rocm_version ))
307
307
if args .use_split_cross_attention == False and args .use_quad_cross_attention == False :
308
- if torch_version_numeric [ 0 ] >= 2 and torch_version_numeric [ 1 ] >= 7 : # works on 2.6 but doesn't actually seem to improve much
308
+ if torch_version_numeric >= ( 2 , 7 ) : # works on 2.6 but doesn't actually seem to improve much
309
309
if any ((a in arch ) for a in ["gfx1100" , "gfx1101" , "gfx1151" ]): # TODO: more arches
310
310
ENABLE_PYTORCH_ATTENTION = True
311
311
except :
@@ -328,7 +328,7 @@ def is_amd():
328
328
pass
329
329
330
330
try :
331
- if torch_version_numeric [ 0 ] == 2 and torch_version_numeric [ 1 ] >= 5 :
331
+ if torch_version_numeric >= ( 2 , 5 ) :
332
332
torch .backends .cuda .allow_fp16_bf16_reduction_math_sdp (True )
333
333
except :
334
334
logging .warning ("Warning, could not set allow_fp16_bf16_reduction_math_sdp" )
@@ -1276,11 +1276,11 @@ def supports_fp8_compute(device=None):
1276
1276
if props .minor < 9 :
1277
1277
return False
1278
1278
1279
- if torch_version_numeric [ 0 ] < 2 or ( torch_version_numeric [ 0 ] == 2 and torch_version_numeric [ 1 ] < 3 ):
1279
+ if torch_version_numeric < ( 2 , 3 ):
1280
1280
return False
1281
1281
1282
1282
if WINDOWS :
1283
- if ( torch_version_numeric [ 0 ] == 2 and torch_version_numeric [ 1 ] < 4 ):
1283
+ if torch_version_numeric < ( 2 , 4 ):
1284
1284
return False
1285
1285
1286
1286
return True
You can’t perform that action at this time.
0 commit comments