File tree 1 file changed +16
-0
lines changed 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 22
22
"TORCH_VERSION_AT_LEAST_2_3" ,
23
23
"TORCH_VERSION_AT_LEAST_2_4" ,
24
24
"TORCH_VERSION_AT_LEAST_2_5" ,
25
+
26
+ # Needs to be deprecated in the future
27
+ "TORCH_VERSION_AFTER_2_2" ,
28
+ "TORCH_VERSION_AFTER_2_3" ,
29
+ "TORCH_VERSION_AFTER_2_4" ,
30
+ "TORCH_VERSION_AFTER_2_5" ,
25
31
]
26
32
27
33
@@ -301,3 +307,13 @@ def torch_version_at_least(min_version):
301
307
TORCH_VERSION_AT_LEAST_2_4 = torch_version_at_least ("2.4.0" )
302
308
TORCH_VERSION_AT_LEAST_2_3 = torch_version_at_least ("2.3.0" )
303
309
TORCH_VERSION_AT_LEAST_2_2 = torch_version_at_least ("2.2.0" )
310
+
311
+
312
+ ## Deprecated, will be deleted in the future
313
+ def _torch_version_at_least (min_version ):
314
+ return is_fbcode () or version ("torch" ) >= min_version
315
+
316
+ TORCH_VERSION_AFTER_2_5 = _torch_version_at_least ("2.5.0.dev" )
317
+ TORCH_VERSION_AFTER_2_4 = _torch_version_at_least ("2.4.0.dev" )
318
+ TORCH_VERSION_AFTER_2_3 = _torch_version_at_least ("2.3.0.dev" )
319
+ TORCH_VERSION_AFTER_2_2 = _torch_version_at_least ("2.2.0.dev" )
You can’t perform that action at this time.
0 commit comments