@@ -55,10 +55,6 @@ def read_version(file_path="version.txt"):
5555 and platform .system () == "Darwin"
5656)
5757
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-
6258version_prefix = read_version ()
6359# Version is version.dev year month date if using nightlies and version if not
6460version = (
@@ -288,17 +284,6 @@ def get_extensions():
288284 ["-O3" if not debug_mode else "-O0" , "-fdiagnostics-color=always" ]
289285 )
290286
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-
302287 if debug_mode :
303288 extra_compile_args ["cxx" ].append ("-g" )
304289 if "nvcc" in extra_compile_args :
@@ -320,12 +305,6 @@ def get_extensions():
320305
321306 # Collect C++ source files
322307 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 ]
329308
330309 extensions_cuda_dir = os .path .join (extensions_dir , "cuda" )
331310 cuda_sources = list (
0 commit comments