diff mbox series

[mickledore,v2] fixup! python3-numpy: remove NPY_INLINE, use inline instead

Message ID 20230908041616.3574595-1-mingli.yu@windriver.com
State New
Headers show
Series [mickledore,v2] fixup! python3-numpy: remove NPY_INLINE, use inline instead | expand

Commit Message

Yu, Mingli Sept. 8, 2023, 4:16 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

 Fixes:
   /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512fintrin.h:314:1: error: inlining failed in call to 'always_inline' '_mm512_setzero_ps': target specific option mismatch
   314 | _mm512_setzero_ps (void)
       | ^~~~~~~~~~~~~~~~~
   numpy/core/src/umath/simd.inc.src:977:20: note: called from here
   977 |     @vtype@ zeros = _mm512_setzero_@vsuffix@();
       |                    ^~~~~~~~~~~~~~~~~~~
   numpy/core/src/umath/simd.inc.src:596:1: error: inlining failed in call to ‘always_inline’ ‘avx512_get_full_load_mask_ps’: target specific option mismatch
   596 | avx512_get_full_load_mask_ps(void)
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  numpy/core/src/umath/simd.inc.src:976:27: note: called from here
   976 |     @mask@ load_mask = avx512_get_full_load_mask_@vsuffix@();
       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 .../0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Khem Raj Sept. 8, 2023, 4:46 a.m. UTC | #1
when do we see these errors ? how does this impact performance?

On Thu, Sep 7, 2023 at 9:16 PM Yu, Mingli <mingli.yu@eng.windriver.com> wrote:
>
> From: Mingli Yu <mingli.yu@windriver.com>
>
>  Fixes:
>    /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512fintrin.h:314:1: error: inlining failed in call to 'always_inline' '_mm512_setzero_ps': target specific option mismatch
>    314 | _mm512_setzero_ps (void)
>        | ^~~~~~~~~~~~~~~~~
>    numpy/core/src/umath/simd.inc.src:977:20: note: called from here
>    977 |     @vtype@ zeros = _mm512_setzero_@vsuffix@();
>        |                    ^~~~~~~~~~~~~~~~~~~
>    numpy/core/src/umath/simd.inc.src:596:1: error: inlining failed in call to ‘always_inline’ ‘avx512_get_full_load_mask_ps’: target specific option mismatch
>    596 | avx512_get_full_load_mask_ps(void)
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   numpy/core/src/umath/simd.inc.src:976:27: note: called from here
>    976 |     @mask@ load_mask = avx512_get_full_load_mask_@vsuffix@();
>        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  .../0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch       | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> index d733dda333..73c9c79bdd 100644
> --- a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> +++ b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> @@ -117,7 +117,7 @@ index d6c9a7e..39aec9a 100644
>
>   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
>  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> ++static inline NPY_GCC_TARGET_AVX512F void
>   AVX512F_@func@_@TYPE@(@type@ * op,
>                         @type@ * ip,
>                         const npy_intp array_size,
> @@ -126,7 +126,7 @@ index d6c9a7e..39aec9a 100644
>
>   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
>  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> ++static inline NPY_GCC_TARGET_AVX512F void
>   AVX512F_absolute_@TYPE@(@type@ * op,
>                           @type@ * ip,
>                           const npy_intp array_size,
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#187402): https://lists.openembedded.org/g/openembedded-core/message/187402
> Mute This Topic: https://lists.openembedded.org/mt/101231101/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Yu, Mingli Sept. 8, 2023, 5:29 a.m. UTC | #2
We will encounter the build failure when debug enabled(add DEBUG_BUILD = "1" in local.conf) [1].

[1] https://git.openembedded.org/openembedded-core/commit/?h=mickledore&id=77a64a8686b6c9ef3bc6adbce6cdc442096decfd

Thanks,
________________________________
From: Khem Raj <raj.khem@gmail.com>
Sent: Friday, September 8, 2023 12:46
To: Yu, Mingli <Mingli.Yu@windriver.com>
Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [mickledore][PATCH v2] fixup! python3-numpy: remove NPY_INLINE, use inline instead

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

when do we see these errors ? how does this impact performance?

On Thu, Sep 7, 2023 at 9:16 PM Yu, Mingli <mingli.yu@eng.windriver.com> wrote:
>
> From: Mingli Yu <mingli.yu@windriver.com>
>
>  Fixes:
>    /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512fintrin.h:314:1: error: inlining failed in call to 'always_inline' '_mm512_setzero_ps': target specific option mismatch
>    314 | _mm512_setzero_ps (void)
>        | ^~~~~~~~~~~~~~~~~
>    numpy/core/src/umath/simd.inc.src:977:20: note: called from here
>    977 |     @vtype@ zeros = _mm512_setzero_@vsuffix@();
>        |                    ^~~~~~~~~~~~~~~~~~~
>    numpy/core/src/umath/simd.inc.src:596:1: error: inlining failed in call to ‘always_inline’ ‘avx512_get_full_load_mask_ps’: target specific option mismatch
>    596 | avx512_get_full_load_mask_ps(void)
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   numpy/core/src/umath/simd.inc.src:976:27: note: called from here
>    976 |     @mask@ load_mask = avx512_get_full_load_mask_@vsuffix@();
>        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  .../0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch       | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> index d733dda333..73c9c79bdd 100644
> --- a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> +++ b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> @@ -117,7 +117,7 @@ index d6c9a7e..39aec9a 100644
>
>   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
>  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> ++static inline NPY_GCC_TARGET_AVX512F void
>   AVX512F_@func@_@TYPE@(@type@ * op,
>                         @type@ * ip,
>                         const npy_intp array_size,
> @@ -126,7 +126,7 @@ index d6c9a7e..39aec9a 100644
>
>   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
>  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> ++static inline NPY_GCC_TARGET_AVX512F void
>   AVX512F_absolute_@TYPE@(@type@ * op,
>                           @type@ * ip,
>                           const npy_intp array_size,
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#187402): https://lists.openembedded.org/g/openembedded-core/message/187402
> Mute This Topic: https://lists.openembedded.org/mt/101231101/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj Sept. 8, 2023, 5:45 a.m. UTC | #3
On Thu, Sep 7, 2023 at 10:29 PM Yu, Mingli <Mingli.Yu@windriver.com> wrote:
>
> We will encounter the build failure when debug enabled(add DEBUG_BUILD = "1" in local.conf) [1].
>

I would suggest to keep it limited to this option then

> [1] https://git.openembedded.org/openembedded-core/commit/?h=mickledore&id=77a64a8686b6c9ef3bc6adbce6cdc442096decfd
>
> Thanks,
> ________________________________
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Friday, September 8, 2023 12:46
> To: Yu, Mingli <Mingli.Yu@windriver.com>
> Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
> Subject: Re: [OE-core] [mickledore][PATCH v2] fixup! python3-numpy: remove NPY_INLINE, use inline instead
>
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> when do we see these errors ? how does this impact performance?
>
> On Thu, Sep 7, 2023 at 9:16 PM Yu, Mingli <mingli.yu@eng.windriver.com> wrote:
> >
> > From: Mingli Yu <mingli.yu@windriver.com>
> >
> >  Fixes:
> >    /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512fintrin.h:314:1: error: inlining failed in call to 'always_inline' '_mm512_setzero_ps': target specific option mismatch
> >    314 | _mm512_setzero_ps (void)
> >        | ^~~~~~~~~~~~~~~~~
> >    numpy/core/src/umath/simd.inc.src:977:20: note: called from here
> >    977 |     @vtype@ zeros = _mm512_setzero_@vsuffix@();
> >        |                    ^~~~~~~~~~~~~~~~~~~
> >    numpy/core/src/umath/simd.inc.src:596:1: error: inlining failed in call to ‘always_inline’ ‘avx512_get_full_load_mask_ps’: target specific option mismatch
> >    596 | avx512_get_full_load_mask_ps(void)
> >        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >   numpy/core/src/umath/simd.inc.src:976:27: note: called from here
> >    976 |     @mask@ load_mask = avx512_get_full_load_mask_@vsuffix@();
> >        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> > ---
> >  .../0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch       | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> > index d733dda333..73c9c79bdd 100644
> > --- a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> > +++ b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
> > @@ -117,7 +117,7 @@ index d6c9a7e..39aec9a 100644
> >
> >   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
> >  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> > -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> > ++static inline NPY_GCC_TARGET_AVX512F void
> >   AVX512F_@func@_@TYPE@(@type@ * op,
> >                         @type@ * ip,
> >                         const npy_intp array_size,
> > @@ -126,7 +126,7 @@ index d6c9a7e..39aec9a 100644
> >
> >   #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
> >  -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
> > -+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
> > ++static inline NPY_GCC_TARGET_AVX512F void
> >   AVX512F_absolute_@TYPE@(@type@ * op,
> >                           @type@ * ip,
> >                           const npy_intp array_size,
> > --
> > 2.25.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#187402): https://lists.openembedded.org/g/openembedded-core/message/187402
> > Mute This Topic: https://lists.openembedded.org/mt/101231101/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
index d733dda333..73c9c79bdd 100644
--- a/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
+++ b/meta/recipes-devtools/python/python3-numpy/0001-simd.inc.src-Change-NPY_INLINE-to-inline.patch
@@ -117,7 +117,7 @@  index d6c9a7e..39aec9a 100644
  
  #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
 -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
-+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
++static inline NPY_GCC_TARGET_AVX512F void
  AVX512F_@func@_@TYPE@(@type@ * op,
                        @type@ * ip,
                        const npy_intp array_size,
@@ -126,7 +126,7 @@  index d6c9a7e..39aec9a 100644
  
  #if defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS && defined NPY_HAVE_SSE2_INTRINSICS
 -static NPY_GCC_OPT_3 NPY_INLINE NPY_GCC_TARGET_AVX512F void
-+static NPY_GCC_OPT_3 inline NPY_GCC_TARGET_AVX512F void
++static inline NPY_GCC_TARGET_AVX512F void
  AVX512F_absolute_@TYPE@(@type@ * op,
                          @type@ * ip,
                          const npy_intp array_size,