@@ -55,10 +55,6 @@ def read_version(file_path="version.txt"):
55
55
and platform .system () == "Darwin"
56
56
)
57
57
58
- use_cpp_avx512 = os .getenv ("USE_AVX512" , "1" ) == "1" and platform .system () == "Linux"
59
-
60
- from torchao .utils import TORCH_VERSION_AT_LEAST_2_7
61
-
62
58
version_prefix = read_version ()
63
59
# Version is version.dev year month date if using nightlies and version if not
64
60
version = (
@@ -288,17 +284,6 @@ def get_extensions():
288
284
["-O3" if not debug_mode else "-O0" , "-fdiagnostics-color=always" ]
289
285
)
290
286
291
- if use_cpp_avx512 and TORCH_VERSION_AT_LEAST_2_7 :
292
- if torch ._C ._cpu ._is_avx512_supported ():
293
- extra_compile_args ["cxx" ].extend (
294
- [
295
- "-DCPU_CAPABILITY_AVX512" ,
296
- "-march=native" ,
297
- "-mfma" ,
298
- "-fopenmp" ,
299
- ]
300
- )
301
-
302
287
if debug_mode :
303
288
extra_compile_args ["cxx" ].append ("-g" )
304
289
if "nvcc" in extra_compile_args :
@@ -320,12 +305,6 @@ def get_extensions():
320
305
321
306
# Collect C++ source files
322
307
sources = list (glob .glob (os .path .join (extensions_dir , "**/*.cpp" ), recursive = True ))
323
- if IS_WINDOWS :
324
- # Remove csrc/cpu/*.cpp on Windows due to the link issue: unresolved external symbol PyInit__C
325
- excluded_sources = list (
326
- glob .glob (os .path .join (extensions_dir , "cpu/*.cpp" ), recursive = True )
327
- )
328
- sources = [s for s in sources if s not in excluded_sources ]
329
308
330
309
extensions_cuda_dir = os .path .join (extensions_dir , "cuda" )
331
310
cuda_sources = list (
0 commit comments