From 3253ab7c9c1f6faea0e5eb0a906db1a08ef42026 Mon Sep 17 00:00:00 2001 From: Raghuveer Devulapalli Date: Thu, 20 Feb 2020 13:38:07 -0800 Subject: [PATCH] BUG: Remove check requiring float/double natural alignment for AVX code In a x86-32 bit system, doubles need not be naturally aligned to 8 Byte boundary (see: -malign-double section of https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html). Having this check meant it ran different code paths (AVX v/s scalar) depending on the alignment of data which leads to different results and test failing intermittently. AVX code uses un-aligned loads and this check is unnecessary to begin with. --- numpy/core/src/umath/simd.inc.src | 1 - 1 file changed, 1 deletion(-) diff --git a/numpy/core/src/umath/simd.inc.src b/numpy/core/src/umath/simd.inc.src index 7ec90f9c8ddf..8db0f6ee6c3c 100644 --- a/numpy/core/src/umath/simd.inc.src +++ b/numpy/core/src/umath/simd.inc.src @@ -96,7 +96,6 @@ abs_ptrdiff(char *a, char *b) */ #define IS_OUTPUT_BLOCKABLE_UNARY(esize, vsize) \ (steps[1] == (esize) && abs(steps[0]) < MAX_STEP_SIZE && \ - (npy_is_aligned(args[0], esize) && npy_is_aligned(args[1], esize)) && \ ((abs_ptrdiff(args[1], args[0]) >= (vsize)) || \ ((abs_ptrdiff(args[1], args[0]) == 0))))