public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/files/
Date: Mon, 28 Aug 2023 06:44:05 +0000 (UTC)	[thread overview]
Message-ID: <1693205017.f86f0e650d2bc739837a28cd32bc4c255cca258a.sam@gentoo> (raw)

commit:     f86f0e650d2bc739837a28cd32bc4c255cca258a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 28 06:43:37 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 28 06:43:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f86f0e65

media-libs/opencv: fix amd64 build (oops)

Bug: https://bugs.gentoo.org/913031
Closes: https://bugs.gentoo.org/913131
Fixes: 4e6bb1138e0e8009b6e66b479e417d4d7c066fda
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../opencv/files/opencv-4.8.0-arm64-fp16.patch     | 56 +++++++++++-----------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch b/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch
index 84e36f88e6f7..6bf04daf58ae 100644
--- a/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch
+++ b/media-libs/opencv/files/opencv-4.8.0-arm64-fp16.patch
@@ -23,7 +23,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
      conv->useFP16 = false;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
      // TODO: add FP16 support for Winograd.
      if (_useFP16 && (conv->conv_type == CONV_TYPE_GENERIC || conv->conv_type == CONV_TYPE_DEPTHWISE_REMAIN))
          conv->useFP16 = true;
@@ -32,7 +32,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
          int nweights = C * padded_ksize;
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
          if (conv->useFP16)
          {
              conv->weightsBuf_FP16.resize(nweights + VEC_ALIGN);
@@ -41,7 +41,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
          const int CONV_WINO_NATOMS_F32 = CONV_WINO_AREA / CONV_WINO_ATOM_F32; // for AVX2, it is 8, otherwise, it's 16.
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
          // FP 16
          const int CONV_WINO_ATOM_F16 = CONV_WINO_ATOM_F32 * 2;
          const int CONV_WINO_NATOMS_F16 = CONV_WINO_AREA / CONV_WINO_ATOM_F16;
@@ -50,7 +50,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
          float* wptrWino = nullptr;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
          float16_t* wptrWino_FP16 = nullptr;
          if (conv->useFP16)
          {
@@ -59,7 +59,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
                  // repack the data.
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                  if (conv->useFP16)
                  {
                      float16_t* wptr = wptrWino_FP16 + (g*Kg_nblocks + ki) * Cg *CONV_WINO_KBLOCK*CONV_WINO_AREA +
@@ -68,7 +68,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
          float* weightsBufPtr = nullptr;
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
          int numStripsMR_FP16 = (Kg + CONV_MR_FP16 - 1) / CONV_MR_FP16;
          int Kg_aligned_FP16 = numStripsMR_FP16 * CONV_MR_FP16;
          size_t nweights_FP16 = ngroups * Kg_aligned_FP16 * DkHkWkCg;
@@ -77,7 +77,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
          // Pack the weight.
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
          if (conv->useFP16)
          {
              parallel_for_(Range(0, ngroups * numStripsMR_FP16), [&](const Range& r0){
@@ -86,7 +86,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
      float* inptrInC = (float* )inptrIn;
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
      float16_t* inpbufC_FP16 = (float16_t *)inpbufC;
      if (esz == sizeof(float16_t))
      {
@@ -95,7 +95,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
      float* inptrInC = inptrIn;
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
      float16_t* inpbufC_FP16 = (float16_t *)inpbufC;
      if (esz == sizeof(float16_t))
      {
@@ -104,7 +104,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  }
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
  // Fast convert float 32 to float16
  static inline void _cvt32f16f( const float* src, float16_t* dst, int len)
  {
@@ -113,7 +113,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                  // Make special branch where memcpy() is called with a constant buffer size.
                  // Compilers will likely unroll this loop properly.
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                  if (useFP16)
                  {
                      for (int c = 0; c < Cg; c++, inptr += inp_planesize, inpbuf += CONV_NR_esz)
@@ -122,7 +122,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
              else
              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                  if (useFP16)
                  {
                      for (int c = 0; c < Cg; c++, inptr += inp_planesize, inpbuf += CONV_NR_esz)
@@ -131,7 +131,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              int w1 = std::min(Wk, (Wi - in_w + dilation_w-1)/dilation_w);
                              const float* inptrInC = inptrIn;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                              if (useFP16)
                              {
                                  float16_t* inpbufC = (float16_t *)inpbuf + s0;
@@ -140,7 +140,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
                              const float* inptrInC = inptrIn;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                              if (useFP16)
                              {
                                  float16_t* inpbufC = (float16_t *)inpbuf + s0;
@@ -149,7 +149,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              int w1 = std::min(Wk, (Wi - in_w + dilation_w-1)/dilation_w);
                              const float* inptrInC = inptrIn;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                              if (useFP16)
                              {
                                  float16_t* inpbufC = (float16_t* )inpbuf + s0;
@@ -158,7 +158,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                  {
                      float* inpbuf_ki = (float* )inpbuf + k * CONV_NR * Cg + i;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                      float16_t * inpbuf_ki_FP16 = (float16_t *)inpbuf + k * CONV_NR * Cg + i;
  #endif
  
@@ -167,7 +167,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              if (stride_w == 1)
                              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                  if (useFP16)
                                  {
                                      for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -176,7 +176,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              else if (stride_w == 2)
                              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                  if (useFP16)
                                  {
                                      for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -185,7 +185,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              else
                              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                  if (useFP16)
                                  {
                                      for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -194,7 +194,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              if (stride_w == 1)
                              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                  if (useFP16)
                                  {
                                      for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -203,7 +203,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                              else
                              {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                  if (useFP16)
                                  {
                                      for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -212,7 +212,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                          else
                          {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                              if (useFP16)
                              {
                                  for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR, inptr_ki += inp_planesize)
@@ -221,7 +221,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                      else
                      {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                          if (useFP16)
                          {
                              for (int c = 0; c < Cg; c++, inpbuf_ki_FP16 += CONV_NR)
@@ -230,7 +230,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
      int esz = sizeof(float );
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
      if (useFP16)
      {
          // works at FP 16.
@@ -239,7 +239,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
  
                  char *weights = nullptr;
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                  if (useFP16)
                  {
                      CV_Assert(!conv->weightsBuf_FP16.empty());
@@ -248,7 +248,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                          if (conv->useNEON)
                          {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                              if (useFP16)
                              {
                                  opt_NEON::convBlockMR1_FP16(DkHkWkCg, weights, inptr, cptr, biasVal, fusedAdd, minval, maxval, ifMinMaxAct, outLen, CONV_NR);
@@ -257,7 +257,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                                  if (conv->useNEON)
                                  {
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                                      if (useFP16)
                                      {
                                          opt_NEON::convBlock_FP16(c1 - c0, wptr, inptr, (char *)cptr_f16, ldc, c0 == 0, outLen, CONV_MR, CONV_NR);
@@ -266,7 +266,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
                          int j = 0;
  
 -#ifdef CONV_ARM_FP16
-+#if CV_FP16
++#if defined(CONV_ARM_FP16) && CV_FP16
                          if (useFP16)
                          {
                              float32x4_t vbias = vdupq_n_f32(biasval);


             reply	other threads:[~2023-08-28  6:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28  6:44 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-23 14:30 [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/files/ Conrad Kostecki
2024-10-08  7:09 Florian Schmaus
2018-05-25 19:36 Amy Liffey
2018-02-05 17:50 Amy Liffey
2017-09-05 18:16 Amy Liffey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1693205017.f86f0e650d2bc739837a28cd32bc4c255cca258a.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox