[pocl] 04/10: refresh/remove patches

Andreas Beckmann anbe at moszumanska.debian.org
Wed Jan 17 13:58:16 UTC 2018


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch 1.0
in repository pocl.

commit 57bbb83a9f3f10fc7164adfaf1808c3b78ef493a
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri Dec 8 10:19:04 2017 +0100

    refresh/remove patches
---
 debian/changelog                                   |   1 +
 ...size-in-tests-runtime-test_clBuildProgram.patch | 106 ---------------------
 ...n-switch-back-to-force-inlining-only-some.patch |  77 ---------------
 .../patches/cmake-no-llvm-sys-getHostCPUName.patch |  12 +--
 debian/patches/series                              |   2 -
 debian/patches/typos.patch                         |  40 ++++----
 6 files changed, 27 insertions(+), 211 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 048fcf2..5428155 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 pocl (1.0-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Refresh/remove patches.
 
  -- Andreas Beckmann <anbe at debian.org>  Wed, 17 Jan 2018 06:34:27 +0100
 
diff --git a/debian/patches/0001-Fix-malloc-size-in-tests-runtime-test_clBuildProgram.patch b/debian/patches/0001-Fix-malloc-size-in-tests-runtime-test_clBuildProgram.patch
deleted file mode 100644
index dd0e905..0000000
--- a/debian/patches/0001-Fix-malloc-size-in-tests-runtime-test_clBuildProgram.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 62b74d6fb7e356e07515ee84d0b4d54442148405 Mon Sep 17 00:00:00 2001
-From: Michal Babej <michal.babej at tut.fi>
-Date: Mon, 4 Sep 2017 19:31:33 +0200
-Subject: [PATCH] Fix malloc size in tests/runtime/test_clBuildProgram.c
-
----
- tests/runtime/test_clBuildProgram.c | 69 +++++++++++++++++++++----------------
- 1 file changed, 40 insertions(+), 29 deletions(-)
-
-diff --git a/tests/runtime/test_clBuildProgram.c b/tests/runtime/test_clBuildProgram.c
-index 4eb544c0..7b4a1ba6 100644
---- a/tests/runtime/test_clBuildProgram.c
-+++ b/tests/runtime/test_clBuildProgram.c
-@@ -141,12 +141,17 @@ main(void){
-               size_t log_size = 0;
-               CHECK_CL_ERROR(clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
-                       0, NULL, &log_size));
--              char *log = malloc(log_size);
--              CHECK_CL_ERROR(clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
--                      log_size, log, NULL));
--              log[log_size] = '\0';
--              fprintf(stderr, "preprocess failure log[%u]: %s\n", i, log);
--              free(log);
-+              if (log_size)
-+                {
-+                  char *log = malloc (log_size + 1);
-+                  fprintf (stderr, "log: %p\n", log);
-+                  CHECK_CL_ERROR (clGetProgramBuildInfo (program, devices[i],
-+                                                         CL_PROGRAM_BUILD_LOG,
-+                                                         log_size, log, NULL));
-+                  log[log_size] = '\0';
-+                  fprintf (stderr, "preprocess failure log[%u]: %s\n", i, log);
-+                  free (log);
-+                }
-       }
-       /*Lets not release the program as we need it in the next test case*/
-       /*CHECK_CL_ERROR(clReleaseProgram(program));*/
-@@ -159,16 +164,19 @@ main(void){
- 
-       for (i = 0; i < num_devices; ++i) {
-           size_t log_size = 0;
--          err = clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
--              0, NULL, &log_size);
--          CHECK_OPENCL_ERROR_IN("get build log size");
--          char *log = malloc(log_size);
--          err = clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
--              log_size, log, NULL);
--          CHECK_OPENCL_ERROR_IN("get build log");
--          log[log_size] = '\0';
--          fprintf(stderr, "preprocess failure log[%u]: %s\n", i, log);
--          free(log);
-+          CHECK_CL_ERROR (clGetProgramBuildInfo (
-+              program, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size));
-+          if (log_size)
-+            {
-+              char *log = malloc (log_size + 1);
-+              err = clGetProgramBuildInfo (program, devices[i],
-+                                           CL_PROGRAM_BUILD_LOG, log_size, log,
-+                                           NULL);
-+              CHECK_OPENCL_ERROR_IN ("get build log");
-+              log[log_size] = '\0';
-+              fprintf (stderr, "preprocess failure log[%u]: %s\n", i, log);
-+              free (log);
-+            }
-       }
- 
-       CHECK_CL_ERROR(clReleaseProgram(program));
-@@ -264,19 +272,22 @@ main(void){
- 
-       for (i = 0; i < num_devices; ++i) {
-           size_t log_size = 0;
--          err = clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
--                                      0, NULL, &log_size);
--          CHECK_OPENCL_ERROR_IN("get build log size");
--          char *log = malloc(log_size);
--          err = clGetProgramBuildInfo(program, devices[i], CL_PROGRAM_BUILD_LOG,
--                                      log_size, log, NULL);
--          CHECK_OPENCL_ERROR_IN("get build log");
--          log[log_size] = '\0';
--          /*As this build option deprecated after OCL1.0 we should see a warning here*/
--          fprintf(stderr, "Deprecated -cl-strict-aliasing log[%u]: %s\n", i, log);
--
--          free(log);
--
-+          CHECK_CL_ERROR (clGetProgramBuildInfo (
-+              program, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size));
-+          if (log_size)
-+            {
-+              char *log = malloc (log_size + 1);
-+              err = clGetProgramBuildInfo (program, devices[i],
-+                                           CL_PROGRAM_BUILD_LOG,
-+                                           log_size, log, NULL);
-+              CHECK_OPENCL_ERROR_IN ("get build log");
-+              log[log_size] = '\0';
-+              /*As this build option deprecated after OCL1.0 we should see a
-+               * warning here*/
-+              fprintf (stderr, "Deprecated -cl-strict-aliasing log[%u]: %s\n",
-+                       i, log);
-+              free (log);
-+            }
-           cl_program_binary_type bin_type = 0;
-           err = clGetProgramBuildInfo(program, devices[i],
-                                       CL_PROGRAM_BINARY_TYPE,
--- 
-2.15.1
-
diff --git a/debian/patches/0002-llvm-Flatten-switch-back-to-force-inlining-only-some.patch b/debian/patches/0002-llvm-Flatten-switch-back-to-force-inlining-only-some.patch
deleted file mode 100644
index 3c3097e..0000000
--- a/debian/patches/0002-llvm-Flatten-switch-back-to-force-inlining-only-some.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c9d2cd1518a6f6578bb784c843f9269213838946 Mon Sep 17 00:00:00 2001
-From: Michal Babej <michal.babej at tut.fi>
-Date: Fri, 19 May 2017 17:46:11 +0200
-Subject: [PATCH] llvm/Flatten: switch back to force-inlining only some funcs
-
-The new code in Flatten added AlwaysInline attr to everything
-except kernel.
-
-This switches Flatten back to its original code (adding AlwaysInline
-only to users of global variables); additionally it adds AlwaysInline
-on barrier().
-
-The problem with flattening all code is that OpenCL spec requires
-maximum number of image arguments to a kernel to be at least 127.
-write_imagef() is relatively heavy on stack, and AlwaysInline on a
-kernel with 127 images and 127 calls to write_imagef() will require
-a giant stack, if we force inlining of all write_imagef() calls.
----
- lib/llvmopencl/Flatten.cc   | 15 +++++++++++++--
- lib/llvmopencl/Workgroup.cc |  1 +
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/lib/llvmopencl/Flatten.cc b/lib/llvmopencl/Flatten.cc
-index fde069b8..a6248462 100644
---- a/lib/llvmopencl/Flatten.cc
-+++ b/lib/llvmopencl/Flatten.cc
-@@ -61,7 +61,7 @@ static RegisterPass<Flatten> X("flatten", "Kernel function flattening pass");
- 
- //#define DEBUG_FLATTEN
- 
--#define INLINE_ALL_NON_KERNEL
-+//#define INLINE_ALL_NON_KERNEL
- 
- #ifdef INLINE_ALL_NON_KERNEL
- 
-@@ -153,7 +153,7 @@ Flatten::runOnModule(Module &M)
-     for (Value::use_iterator i = v->use_begin(), e = v->use_end();
-          i != e; ++i) {
-       llvm::User *user = i->getUser();
--      if (Instruction *ci = dyn_cast<Instruction>(user) {
-+      if (Instruction *ci = dyn_cast<Instruction>(user)) {
-         // Prevent infinite looping on recursive functions
-         // (though OpenCL does not allow this?)
-         Function *f = ci->getParent()->getParent();;
-@@ -175,6 +175,17 @@ Flatten::runOnModule(Module &M)
-     (*i)->addFnAttr(Attribute::AlwaysInline);
-   }
- 
-+  StringRef barrier("_Z7barrierj");
-+  for (llvm::Module::iterator i = M.begin(), e = M.end(); i != e; ++i) {
-+    llvm::Function *f = &*i;
-+    if (f->isDeclaration())
-+      continue;
-+    if (f->getName().equals(barrier)) {
-+      f->removeFnAttr(Attribute::NoInline);
-+      f->addFnAttr(Attribute::AlwaysInline);
-+    }
-+  }
-+
-   return true;
- }
- 
-diff --git a/lib/llvmopencl/Workgroup.cc b/lib/llvmopencl/Workgroup.cc
-index 946c8323..e029a288 100644
---- a/lib/llvmopencl/Workgroup.cc
-+++ b/lib/llvmopencl/Workgroup.cc
-@@ -214,6 +214,7 @@ Workgroup::runOnModule(Module &M)
-     Function *L = createLauncher(M, &*i);
- 
-     L->addFnAttr(Attribute::NoInline);
-+    L->removeFnAttr(Attribute::AlwaysInline);
- 
-     privatizeContext(M, L);
- 
--- 
-2.15.1
-
diff --git a/debian/patches/cmake-no-llvm-sys-getHostCPUName.patch b/debian/patches/cmake-no-llvm-sys-getHostCPUName.patch
index abdd9a8..c789b04 100644
--- a/debian/patches/cmake-no-llvm-sys-getHostCPUName.patch
+++ b/debian/patches/cmake-no-llvm-sys-getHostCPUName.patch
@@ -25,15 +25,15 @@ Description: do not use llvm::sys::getHostCPUName() under CMake
 	 29 - kernel/test_shuffle_ulong (Failed)
 	 30 - kernel/test_shuffle_double (Failed)
 
---- a/lib/CL/pocl_llvm_api.cc
-+++ b/lib/CL/pocl_llvm_api.cc
-@@ -1114,6 +1114,9 @@ int pocl_llvm_get_kernel_metadata(cl_pro
+--- a/lib/CL/pocl_llvm_utils.cc
++++ b/lib/CL/pocl_llvm_utils.cc
+@@ -118,6 +118,9 @@ int getModuleTriple(const char *input_st
  }
  
- char* get_cpu_name() {
+ char *get_cpu_name() {
 +  // HACK!
 +  return strdup(OCL_KERNEL_TARGET_CPU);
 +
  #ifdef __mips__
-   // The MIPS backend isn't able to automatically detect the host yet and the
-   // value returned by llvm::sys::getHostCPUName() isn't usable in the
+   // TODO test: this may be handled by the if-"generic"-then-"HOST_CPU" below.
+   //
diff --git a/debian/patches/series b/debian/patches/series
index db69864..3c9213c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,3 @@
-0001-Fix-malloc-size-in-tests-runtime-test_clBuildProgram.patch
-0002-llvm-Flatten-switch-back-to-force-inlining-only-some.patch
 os-compat.patch
 typos.patch
 glibc-2.23.patch
diff --git a/debian/patches/typos.patch b/debian/patches/typos.patch
index dbd2f17..00ffb43 100644
--- a/debian/patches/typos.patch
+++ b/debian/patches/typos.patch
@@ -3,7 +3,7 @@ Description: fix typos found by lintian
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -269,7 +269,7 @@ endif()
+@@ -346,7 +346,7 @@ endif()
  
  ######################################################################################
  
@@ -12,16 +12,7 @@ Description: fix typos found by lintian
  # also, if DEFAULT_FEATURE_X is 0, prevents FEATURE_X being 1
  # since it takes DEFAULT_FEATURE_X=0 to mean "FEATURE_X is unavailable"
  macro(setup_cached_var VARNAME DESCRIPTION DOCS_FEATURE_IS_UNAVAILABLE DOCS_REQUESTED_DISABLING_FEATURE)
-@@ -329,7 +329,7 @@ if(NOT DEFINED DEFAULT_USE_VECMATHLIB)
- endif()
- 
- setup_cached_var(USE_VECMATHLIB "Vecmathlib use"
--  "Requested enabling vecmathlib use, but either clang++ doesnt work or vecmathlib sources are missing.. -> disabling vecmathlib use"
-+  "Requested enabling vecmathlib use, but either clang++ doesn't work or vecmathlib sources are missing.. -> disabling vecmathlib use"
-   "Vecmathlib is usable, but requested disabling it")
- 
- # vecmathlib does not compile with fp16 currently
-@@ -496,7 +496,7 @@ else()
+@@ -618,7 +618,7 @@ else()
  
      set(HAVE_OCL_ICD 1 CACHE INTERNAL "ICL library is ocl-icd")
      set(OPENCL_FOUND 1 CACHE INTERNAL "opencl ICD/library found")
@@ -30,7 +21,16 @@ Description: fix typos found by lintian
      if (CMAKE_CROSSCOMPILING)
        set(OPENCL_LIBRARIES "${OCL_ICD_LIBRARIES}" CACHE INTERNAL "opencl ICD/library paths")
      else()
-@@ -864,7 +864,7 @@ endif()
+@@ -789,7 +789,7 @@ if(NOT CL_DISABLE_LONG)
+     set(HOST_DEVICE_EXTENSIONS "${HOST_DEVICE_EXTENSIONS} cl_khr_fp64 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics")
+   endif()
+   if(ENABLE_FP64 AND (NOT LLVM_OLDER_THAN_4_0))
+-    # 32bit arm doesnt always uspport doubles
++    # 32bit arm doesn't always support doubles
+     set(HOST_DEVICE_EXTENSIONS "${HOST_DEVICE_EXTENSIONS} cl_khr_fp64")
+   endif()
+ endif()
+@@ -1050,7 +1050,7 @@ endif()
  ##########################################################
  
  # POCL_DEVICE_ADDRESS_BITS
@@ -39,7 +39,7 @@ Description: fix typos found by lintian
  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
    set(POCL_DEVICE_ADDRESS_BITS 64)
  elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-@@ -902,7 +902,7 @@ endif()
+@@ -1088,7 +1088,7 @@ endif()
  # libpocl.so should get only API additions as we are implementing a standard.
  #
  # The library version encodings into the library file name are platform
@@ -50,7 +50,7 @@ Description: fix typos found by lintian
  # http://en.opensuse.org/openSUSE%3aShared_library_packaging_policy#Versioning_schemes
 --- a/lib/CL/devices/hsa/pocl-hsa.c
 +++ b/lib/CL/devices/hsa/pocl-hsa.c
-@@ -1387,7 +1387,7 @@ pocl_hsa_launch(pocl_hsa_device_data_t *
+@@ -1384,7 +1384,7 @@ pocl_hsa_launch(pocl_hsa_device_data_t *
    while ((packet_id - hsa_queue_load_read_index_acquire(last_queue))
           >= last_queue->size)
      {
@@ -72,7 +72,7 @@ Description: fix typos found by lintian
    IMPLEMENT_LLVM_INTRIN_V_VI_ALL(NAME, float, int, BUILTIN, .f32)                          \
 --- a/tests/runtime/test_clGetKernelArgInfo.c
 +++ b/tests/runtime/test_clGetKernelArgInfo.c
-@@ -124,31 +124,31 @@ int test_program(cl_program program, int
+@@ -125,31 +125,31 @@ int test_program(cl_program program, int
    err = clGetKernelArgInfo(test_kernel, 0, CL_KERNEL_ARG_TYPE_NAME,
                              BUF_LEN, &kernel_arg.string, &retsize);
    CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");
@@ -112,7 +112,7 @@ Description: fix typos found by lintian
  
    /* TYPE QUALIFIER tests */
    // constant char* msg, global volatile float* in, global float* out, const float j, local int* c
-@@ -186,8 +186,8 @@ int test_program(cl_program program, int
+@@ -218,8 +218,8 @@ int test_program(cl_program program, int
      printf("arg name not available (this is normal for SPIR)\n");
    } else {
      CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");
@@ -123,7 +123,7 @@ Description: fix typos found by lintian
    }
  
    err = clGetKernelArgInfo(test_kernel, 1, CL_KERNEL_ARG_NAME,
-@@ -196,8 +196,8 @@ int test_program(cl_program program, int
+@@ -228,8 +228,8 @@ int test_program(cl_program program, int
      printf("arg name not available (this is normal for SPIR)\n");
    } else {
      CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");
@@ -134,7 +134,7 @@ Description: fix typos found by lintian
    }
  
    err = clGetKernelArgInfo(test_kernel, 2, CL_KERNEL_ARG_NAME,
-@@ -206,8 +206,8 @@ int test_program(cl_program program, int
+@@ -238,8 +238,8 @@ int test_program(cl_program program, int
      printf("arg name not available (this is normal for SPIR)\n");
    } else {
      CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");
@@ -145,7 +145,7 @@ Description: fix typos found by lintian
    }
  
    err = clGetKernelArgInfo(test_kernel, 3, CL_KERNEL_ARG_NAME,
-@@ -216,8 +216,8 @@ int test_program(cl_program program, int
+@@ -248,8 +248,8 @@ int test_program(cl_program program, int
      printf("arg name not available (this is normal for SPIR)\n");
    } else {
      CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");
@@ -156,7 +156,7 @@ Description: fix typos found by lintian
    }
  
    /* ACCESS QUALIFIER tests for test_kernel2 */
-@@ -242,8 +242,8 @@ int test_program(cl_program program, int
+@@ -274,8 +274,8 @@ int test_program(cl_program program, int
    err = clGetKernelArgInfo(test_kernel2, 0, CL_KERNEL_ARG_TYPE_NAME,
                              BUF_LEN, &kernel_arg.string, &retsize);
    CHECK_OPENCL_ERROR_IN("clGetKernelArgInfo");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/pocl.git



More information about the Pkg-opencl-commits mailing list