From 866f41a85bddfa3ea6de551bb27f335b0f8a6a52 Mon Sep 17 00:00:00 2001 From: Sayed Adel Date: Fri, 3 Feb 2023 12:41:50 +0200 Subject: MAINT, SIMD: Removes compiler definitions of attribute-based CPU dispatching --- numpy/core/setup.py | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'numpy/core/setup.py') diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 2cad4ba43..b48d46c3f 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -171,18 +171,6 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): else: return 1 - # NOTE: not needed in Meson build, we set the minimum - # compiler version to 8.4 to avoid this bug - # GH-14787: Work around GCC<8.4 bug when compiling with AVX512 - # support on Windows-based platforms - def check_gh14787(fn): - if fn == 'attribute_target_avx512f': - if (sys.platform in ('win32', 'cygwin') and - config.check_compiler_gcc() and - not config.check_gcc_version_at_least(8, 4)): - ext.extra_compile_args.extend( - ['-ffixed-xmm%s' % n for n in range(16, 32)]) - #use_msvc = config.check_decl("_MSC_VER") if not check_funcs_once(MANDATORY_FUNCS, add_to_moredefs=False): raise SystemError("One of the required function to build numpy is not" @@ -233,20 +221,8 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): for dec, fn in OPTIONAL_FUNCTION_ATTRIBUTES: if config.check_gcc_function_attribute(dec, fn): moredefs.append((fname2def(fn), 1)) - check_gh14787(fn) platform = sysconfig.get_platform() - if ("x86_64" in platform): - for dec, fn in OPTIONAL_FUNCTION_ATTRIBUTES_AVX: - if config.check_gcc_function_attribute(dec, fn): - moredefs.append((fname2def(fn), 1)) - check_gh14787(fn) - for dec, fn, code, header in ( - OPTIONAL_FUNCTION_ATTRIBUTES_WITH_INTRINSICS_AVX): - if config.check_gcc_function_attribute_with_intrinsics( - dec, fn, code, header): - moredefs.append((fname2def(fn), 1)) - for fn in OPTIONAL_VARIABLE_ATTRIBUTES: if config.check_gcc_variable_attribute(fn): m = fn.replace("(", "_").replace(")", "_") @@ -1019,6 +995,7 @@ def configuration(parent_package='',top_path=None): join('src', 'umath', 'loops_modulo.dispatch.c.src'), join('src', 'umath', 'loops_comparison.dispatch.c.src'), join('src', 'umath', 'loops_unary_complex.dispatch.c.src'), + join('src', 'umath', 'loops_autovec_int.dispatch.c.src'), join('src', 'umath', 'matmul.h.src'), join('src', 'umath', 'matmul.c.src'), join('src', 'umath', 'clip.h'), -- cgit v1.2.1