[pocl] 09/18: refresh consistent-newlines-in-POCL_ABORT.patch

Andreas Beckmann anbe at moszumanska.debian.org
Thu Dec 14 01:54:01 UTC 2017


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

anbe pushed a commit to annotated tag debian/0.14-1
in repository pocl.

commit 2b8fd3dc6585d19eeda7d688587179c3fc8dab64
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri Dec 8 18:14:50 2017 +0100

    refresh consistent-newlines-in-POCL_ABORT.patch
---
 .../consistent-newlines-in-POCL_ABORT.patch        | 104 ++++++++++-----------
 1 file changed, 48 insertions(+), 56 deletions(-)

diff --git a/debian/patches/consistent-newlines-in-POCL_ABORT.patch b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
index fda8490..0da3fad 100644
--- a/debian/patches/consistent-newlines-in-POCL_ABORT.patch
+++ b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
@@ -3,18 +3,18 @@ Description: consistently terminate POCL_ABORT messages with a newline
 
 --- a/lib/CL/devices/devices.c
 +++ b/lib/CL/devices/devices.c
-@@ -257,7 +257,7 @@ pocl_init_devices()
+@@ -264,7 +264,7 @@ pocl_init_devices()
            /* Check if there are device-specific parameters set in the
               POCL_DEVICEn_PARAMETERS env. */
            if (snprintf (env_name, 1024, "POCL_%s%d_PARAMETERS", dev_name, j) < 0)
 -            POCL_ABORT("Unable to generate the env string.");
 +            POCL_ABORT("Unable to generate the env string.\n");
- 
+           pocl_devices[dev_index].dev_id = dev_index;
            pocl_devices[dev_index].ops->init(&pocl_devices[dev_index], getenv(env_name));
  
 --- a/lib/CL/devices/hsa/pocl-hsa.c
 +++ b/lib/CL/devices/hsa/pocl-hsa.c
-@@ -195,7 +195,7 @@ static void pocl_hsa_abort_on_error(hsa_
+@@ -240,7 +240,7 @@ pocl_hsa_abort_on_hsa_error(hsa_status_t
      {
        hsa_status_string(status, &str);
        POCL_MSG_PRINT2(func, line, "Error from HSA Runtime call:\n");
@@ -23,36 +23,45 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
  }
  
-@@ -333,7 +333,7 @@ get_hsa_device_features(char* dev_name,
-                "constant buffer size etc), and there's no way to get"
-                "the required stuff from HSA API. Please create a "
-                "new entry with the information in supported_hsa_devices,"
--               "and send a note/patch to pocl developers. Thanks!");
-+               "and send a note/patch to pocl developers. Thanks!\n");
+@@ -259,7 +259,7 @@ pocl_hsa_abort_on_pthread_error(int stat
+   if (status != 0)
+     {
+       POCL_MSG_PRINT2(func, line, "Error from pthread call:\n");
+-      POCL_ABORT("%s", strerror(status));
++      POCL_ABORT("%s\n", strerror(status));
+     }
  }
  
- void
---- a/lib/CL/devices/tce/tce_common.cc
-+++ b/lib/CL/devices/tce/tce_common.cc
-@@ -124,7 +124,7 @@ TCEDevice::findDataMemoryAddresses() {
-   try {
-     commandQueueAddr = globalScope.dataLabel("kernel_command").address().location();
-   } catch (const KeyNotFound& e) {
--    POCL_ABORT ("Could not find the shared data structures from the device binary.");
-+    POCL_ABORT("Could not find the shared data structures from the device binary.\n");
-   }    
+@@ -435,7 +435,7 @@ get_hsa_device_features(char* dev_name,
+ 		 "constant buffer size etc), and there's no way to get all "
+ 		 "the required info from HSA API. Please create a "
+ 		 "new entry with the information in supported_hsa_devices, "
+-		 "and send a note/patch to pocl developers. Thanks!");
++		 "and send a note/patch to pocl developers. Thanks!\n");
+     }
  }
  
-@@ -422,7 +422,7 @@ pocl_tce_run
+@@ -1092,7 +1092,7 @@ pocl_hsa_compile_kernel (_cl_command_nod
+       d->kernel_cache_lastptr++;
+     }
+   else
+-    POCL_ABORT("kernel cache full");
++    POCL_ABORT("kernel cache full\n");
+ 
+   hsa_executable_symbol_t kernel_symbol;
+ 
+--- a/lib/CL/devices/tce/tce_common.cc
++++ b/lib/CL/devices/tce/tce_common.cc
+@@ -434,7 +434,7 @@ pocl_tce_compile_kernel(_cl_command_node
  #endif
        error = system(buildCmd.c_str());
        if (error != 0)
 -        POCL_ABORT("Error while running tcecc.");
 +        POCL_ABORT("Error while running tcecc.\n");
        }
-     
-     try {
-@@ -430,7 +430,7 @@ pocl_tce_run
+   }
+ }
+@@ -465,7 +465,7 @@ pocl_tce_run(void *data, _cl_command_nod
        d->restartProgram();
      } catch (Exception &e) {
        std::cerr << "error: " << e.errorMessage() << std::endl;
@@ -61,7 +70,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
  
      const TTAProgram::Program* prog = d->currentProgram;
-@@ -441,7 +441,7 @@ pocl_tce_run
+@@ -476,7 +476,7 @@ pocl_tce_run(void *data, _cl_command_nod
      try {
        kernelAddr = globalScope.dataLabel(kernelMdSymbolName).address().location();
      } catch (const KeyNotFound& e) {
@@ -70,7 +79,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
      // cache the currently device loaded kernel info 
      d->updateCurrentKernel(&(cmd->command.run), kernelAddr);
-@@ -605,7 +605,7 @@ pocl_tce_map_mem (void *data, void *buf_
+@@ -641,7 +641,7 @@ pocl_tce_map_mem (void *data, void *buf_
      {
          if (posix_memalign (&target, ALIGNMENT, size) != 0)
          {
@@ -79,18 +88,18 @@ Description: consistently terminate POCL_ABORT messages with a newline
          }
      }
  
-@@ -670,7 +670,7 @@ pocl_tce_build_hash (void *data, SHA1_CT
+@@ -705,7 +705,7 @@ pocl_tce_build_hash (cl_device_id device
    fseek (adf_file, 0, SEEK_SET);
    adf_data = (uint8_t*)malloc (size);
    if (fread (adf_data, 1, size, adf_file) == 0)
 -      POCL_ABORT ("Could not read ADF.");
 +      POCL_ABORT("Could not read ADF.\n");
-   
-   //TCEString machine_hash = tce->dev->hash();
-   pocl_SHA1_Update (build_hash, adf_data, size);
+ 
+   SHA1_CTX ctx;
+   uint8_t bin_dig[SHA1_DIGEST_SIZE];
 --- a/lib/CL/devices/tce/ttasim/ttasim.cc
 +++ b/lib/CL/devices/tce/ttasim/ttasim.cc
-@@ -174,7 +174,7 @@ public:
+@@ -187,7 +187,7 @@ public:
      const char *adf = strrchr(adfName, '/');
      if (adf != NULL) adf++;
      if (snprintf (dev_name, 256, "ttasim-%s", adf) < 0)
@@ -99,7 +108,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      dev->long_name = strdup(dev_name);  
      ++device_count;
  
-@@ -476,7 +476,7 @@ pocl_ttasim_thread (void *p)
+@@ -489,7 +489,7 @@ pocl_ttasim_thread (void *p)
  
          if (d->simulator.hadRuntimeError()) {
              d->simulatorCLI.run();
@@ -108,26 +117,9 @@ Description: consistently terminate POCL_ABORT messages with a newline
          }
      } while (false);
    } while (true);
---- a/lib/CL/pocl_cache.c
-+++ b/lib/CL/pocl_cache.c
-@@ -501,12 +501,12 @@ void pocl_cache_init_topdir() {
-     }
- 
-     if (needed >= POCL_FILENAME_LENGTH) {
--        POCL_ABORT("pocl: cache path longer than maximum filename length");
-+        POCL_ABORT("pocl: cache path longer than maximum filename length\n");
-     }
- 
-     assert(strlen(cache_topdir) > 0);
-     if (pocl_mkdir_p(cache_topdir))
--        POCL_ABORT("Could not create topdir for cache");
-+        POCL_ABORT("Could not create topdir for cache\n");
-     cache_topdir_initialized = 1;
- 
- }
 --- a/lib/CL/pocl_llvm_api.cc
 +++ b/lib/CL/pocl_llvm_api.cc
-@@ -907,7 +907,7 @@ const char* getX86KernelLibName() {
+@@ -1187,7 +1187,7 @@ static const char* getX86KernelLibName()
    if (Features["sse2"])
      res = "sse2";
    else
@@ -136,7 +128,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
    if (Features["ssse3"] && Features["cx16"])
      res = "ssse3";
    if (Features["sse4.1"] && Features["cx16"])
-@@ -1226,7 +1226,7 @@ static PassManager& kernel_compiler_pass
+@@ -1523,7 +1523,7 @@ static PassManager& kernel_compiler_pass
        else
          {
            std::cerr << "Failed to create kernel compiler pass " << passes[i] << std::endl;
@@ -144,8 +136,8 @@ Description: consistently terminate POCL_ABORT messages with a newline
 +          POCL_ABORT("FAIL\n");
          }
      }
-   kernel_compiler_passes[device] = Passes;
-@@ -1343,7 +1343,7 @@ kernel_library
+ 
+@@ -1643,7 +1643,7 @@ kernel_library
            lib = ParseIRFile(kernellib_fallback.c_str(), Err, *GlobalContext());
          }
        else
@@ -154,7 +146,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
    assert (lib != NULL);
    libs[device] = lib;
-@@ -1516,7 +1516,7 @@ void pocl_llvm_update_binaries (cl_progr
+@@ -1823,7 +1823,7 @@ void pocl_llvm_update_binaries (cl_progr
  
        size_t n = content.size();
        if (n < program->binary_sizes[i])
@@ -165,16 +157,16 @@ Description: consistently terminate POCL_ABORT messages with a newline
        program->binaries[i] = (unsigned char *) malloc(n);
 --- a/lib/CL/pocl_queue_util.c
 +++ b/lib/CL/pocl_queue_util.c
-@@ -61,7 +61,7 @@ void pocl_init_queue_list()
+@@ -67,7 +67,7 @@ void pocl_init_queue_list()
    queue_list = calloc(queue_alloc, sizeof(cl_command_queue));
  
    if (!queue_list)
 -    POCL_ABORT("unable to allocate queue list!");
 +    POCL_ABORT("unable to allocate queue list!\n");
  
-   atexit(pocl_finish_all_queues);
+   //atexit(pocl_finish_all_queues);
  
-@@ -104,7 +104,7 @@ void pocl_queue_list_insert(cl_command_q
+@@ -111,7 +111,7 @@ void pocl_queue_list_insert(cl_command_q
      // compaction failed to give us room
      cl_command_queue *resized = realloc(queue_list, queue_alloc + 256);
      if (!resized)

-- 
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