diff options
author | Sayed Adel <seiko@imavr.com> | 2023-02-03 12:41:50 +0200 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2023-02-20 04:07:15 +0200 |
commit | 866f41a85bddfa3ea6de551bb27f335b0f8a6a52 (patch) | |
tree | 4b2ad41ca058771c05ed7688ad8ee5a331fd05bc /numpy/core/setup.py | |
parent | 86450a0cd79a8107453f1b9aeb629e52c388efcc (diff) | |
download | numpy-866f41a85bddfa3ea6de551bb27f335b0f8a6a52.tar.gz |
MAINT, SIMD: Removes compiler definitions of attribute-based CPU dispatching
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 25 |
1 files changed, 1 insertions, 24 deletions
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'), |