"Fossies" - the Fresh Open Source Software Archive

Member "pocl-1.8/examples/AMDSDK3.0/amdsdk3_0.patch" (12 Oct 2021, 6710 Bytes) of package /linux/misc/pocl-1.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "amdsdk3_0.patch": 1.5_vs_1.6.

    1 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/FineGrainSVMCAS/FineGrainSVMCAS_Kernels.cl  2015-12-02 18:29:15.569686180 +0100
    2 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/FineGrainSVMCAS/FineGrainSVMCAS_Kernels.cl  2015-12-02 18:29:36.613019709 +0100
    3 @@ -26,7 +26,7 @@
    4     if (i != get_global_size(0)) {
    5         do {            
    6                 list[i] = head;
    7 -          } while (!atomic_compare_exchange_strong((atomic_int *)&list[0], &head, i));
    8 +          } while (!atomic_compare_exchange_strong((global atomic_int *)&list[0], &head, i));
    9         }
   10  }
   11  
   12 @@ -40,6 +40,6 @@
   13         do {
   14             if (head == 0) return;
   15             next = list[list[0]];
   16 -       } while (!atomic_compare_exchange_strong ((atomic_int *)&list[0], &head, next ));
   17 +       } while (!atomic_compare_exchange_strong ((global atomic_int *)&list[0], &head, next ));
   18     }
   19  }
   20 --- a/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/FineGrainSVMCAS_Kernels.cl  2015-12-02 18:29:15.569686180 +0100
   21 +++ b/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/FineGrainSVMCAS_Kernels.cl  2015-12-02 18:29:36.613019709 +0100
   22 @@ -26,7 +26,7 @@
   23     if (i != get_global_size(0)) {
   24         do {            
   25                 list[i] = head;
   26 -          } while (!atomic_compare_exchange_strong((atomic_int *)&list[0], &head, i));
   27 +          } while (!atomic_compare_exchange_strong((global atomic_int *)&list[0], &head, i));
   28         }
   29  }
   30  
   31 @@ -40,6 +40,6 @@
   32         do {
   33             if (head == 0) return;
   34             next = list[list[0]];
   35 -       } while (!atomic_compare_exchange_strong ((atomic_int *)&list[0], &head, next ));
   36 +       } while (!atomic_compare_exchange_strong ((global atomic_int *)&list[0], &head, next ));
   37     }
   38  }
   39 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/CalcPie/CalcPie_Kernels.cl  2015-12-02 18:26:51.179684865 +0100
   40 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/CalcPie/CalcPie_Kernels.cl  2015-12-02 18:27:01.906351623 +0100
   41 @@ -24,7 +24,7 @@
   42      
   43    float r = sqrt((rX[i]*rX[i])+(rY[i]*rY[i]));
   44    if (r <= 1) 
   45 -   atomic_fetch_add_explicit ((atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
   46 +   atomic_fetch_add_explicit ((global atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
   47  }
   48  
   49  
   50 --- a/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/CalcPie_Kernels.cl  2015-12-02 18:26:51.179684865 +0100
   51 +++ b/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/CalcPie_Kernels.cl  2015-12-02 18:27:01.906351623 +0100
   52 @@ -24,7 +24,7 @@
   53      
   54    float r = sqrt((rX[i]*rX[i])+(rY[i]*rY[i]));
   55    if (r <= 1) 
   56 -   atomic_fetch_add_explicit ((atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
   57 +   atomic_fetch_add_explicit ((global atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
   58  }
   59  
   60  
   61 --- a/AMD-APP-SDK-3.0/include/SDKUtil/CLUtil.hpp    2015-12-02 19:19:06.119713395 +0100
   62 +++ b/AMD-APP-SDK-3.0/include/SDKUtil/CLUtil.hpp    2015-12-02 19:22:34.209715291 +0100
   63 @@ -749,7 +749,7 @@
   64                 case CL_DEVICE_TYPE_GPU :
   65                 {
   66                     //first find platform having GPU
   67 -                   platformFound = getDefaultPlatform(numPlatforms, platforms, platform, dType);
   68 +                   platformFound = getDefaultPlatform(numPlatforms, platforms, platform, CL_DEVICE_TYPE_GPU);
   69                     if(platformFound)
   70                     {
   71                         break;
   72 @@ -763,7 +763,7 @@
   73                     //then find platform having CPU
   74                     if(!platformFound)
   75                     {
   76 -                       platformFound = getDefaultPlatform(numPlatforms, platforms, platform, dType);
   77 +                       platformFound = getDefaultPlatform(numPlatforms, platforms, platform, CL_DEVICE_TYPE_CPU);
   78                     }
   79                 } /*end of CPU case*/
   80  
   81 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope_Kernels.cl    2015-12-02 18:30:59.949687140 +0100
   82 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope_Kernels.cl    2015-12-02 18:31:07.973020545 +0100
   83 @@ -44,7 +44,7 @@
   84  
   85  
   86  
   87 - __global uchar4 program_scope_temp[512 * 512];
   88 +__constant uchar4 program_scope_temp[512 * 512];
   89  
   90  
   91  __kernel 
   92 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter.cpp 2020-09-23 14:19:55.137508386 +0300
   93 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter.cpp 2020-09-23 14:22:33.230012800 +0300
   94 @@ -550,8 +550,9 @@
   95              float gx2 = pow((float)gx, 2);
   96              float gy2 = pow((float)gy, 2);
   97  
   98 -
   99 -            *(verificationOutput + i) = (cl_uchar)(sqrt(gx2 + gy2) / 2.0);
  100 +            float tmp = sqrt(gx2 + gy2) / 2.0;
  101 +            if (tmp > 255.0f) tmp = 255.0f;
  102 +            *(verificationOutput + i) = (cl_uchar)(tmp);
  103          }
  104  
  105          // if reached at the end of its row then incr k
  106 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter_Kernels.cl  2015-10-28 05:15:19.000000000 +0200
  107 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter_Kernels.cl  2020-09-23 14:20:31.365623958 +0300
  108 @@ -56,10 +56,8 @@
  109         Gy =   i00 - i20  + (float4)(2)*i01 - (float4)(2)*i21 + i02  -  i22;
  110  
  111         /* taking root of sums of squares of Gx and Gy */
  112 -       outputImage[c] = convert_uchar4(hypot(Gx, Gy)/(float4)(2));
  113 -
  114 +       outputImage[c] = convert_uchar4_sat(hypot(Gx, Gy)/(float4)(2));
  115     }
  116 -           
  117  }
  118  
  119     
  120 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SimpleMultiDevice/SimpleMultiDevice.cpp 2020-09-28 15:43:52.310211779 +0300
  121 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SimpleMultiDevice/SimpleMultiDevice.cpp 2020-09-28 15:44:37.878321556 +0300
  122 @@ -1471,15 +1471,6 @@
  123      return a * b + c;
  124  }
  125  
  126 -// OpenCL HYPOT definition for CPU
  127 -#if (_MSC_VER != 1800)
  128 -float hypot(float a, float b)
  129 -{
  130 -    return sqrt(a * a + b * b);
  131 -}
  132 -#endif
  133 -
  134 -
  135  int
  136  CPUKernel()
  137  {
  138 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/BinarySearchDeviceSideEnqueue/BinarySearchDeviceSideEnqueue.cpp 2020-09-28 17:21:15.609109066 +0300
  139 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/BinarySearchDeviceSideEnqueue/BinarySearchDeviceSideEnqueue.cpp 2020-09-28 17:21:31.497172793 +0300
  140 @@ -273,7 +273,7 @@
  141          commandQueue = clCreateCommandQueueWithProperties(
  142                             context,
  143                             devices[sampleArgs->deviceId],
  144 -                           prop,
  145 +                           &prop,
  146                             &status);
  147          CHECK_OPENCL_ERROR( status, "clCreateCommandQueueWithProperties failed.");
  148      }
  149 --- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope.cpp.orig  2020-09-28 17:39:33.521349498 +0300
  150 +++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope.cpp   2020-09-28 17:39:44.301390304 +0300
  151 @@ -255,7 +255,7 @@
  152          commandQueue = clCreateCommandQueueWithProperties(
  153                             context,
  154                             devices[sampleArgs->deviceId],
  155 -                           prop,
  156 +                           &prop,
  157                             &status);
  158          CHECK_OPENCL_ERROR( status, "clCreateCommandQueue failed.");
  159      }