[pocl] 05/10: refresh consistent-newlines-in-POCL_ABORT.patch
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 e714d645873ef6d0529ceb91cf34223ee55ec008
Author: Andreas Beckmann <anbe at debian.org>
Date: Wed Dec 13 20:58:07 2017 +0100
refresh consistent-newlines-in-POCL_ABORT.patch
---
.../consistent-newlines-in-POCL_ABORT.patch | 116 +++++++++------------
1 file changed, 49 insertions(+), 67 deletions(-)
diff --git a/debian/patches/consistent-newlines-in-POCL_ABORT.patch b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
index 0da3fad..b1c464b 100644
--- a/debian/patches/consistent-newlines-in-POCL_ABORT.patch
+++ b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
@@ -1,38 +1,27 @@
Author: Andreas Beckmann <anbe at debian.org>
Description: consistently terminate POCL_ABORT messages with a newline
---- a/lib/CL/devices/devices.c
-+++ b/lib/CL/devices/devices.c
-@@ -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
-@@ -240,7 +240,7 @@ pocl_hsa_abort_on_hsa_error(hsa_status_t
+@@ -245,7 +245,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");
+ POCL_MSG_PRINT2(HSA, func, line, "Error from HSA Runtime call:\n");
- POCL_ABORT("%s", str);
+ POCL_ABORT("%s\n", str);
}
}
-@@ -259,7 +259,7 @@ pocl_hsa_abort_on_pthread_error(int stat
+@@ -264,7 +264,7 @@ pocl_hsa_abort_on_pthread_error(int stat
if (status != 0)
{
- POCL_MSG_PRINT2(func, line, "Error from pthread call:\n");
+ POCL_MSG_PRINT2(HSA, func, line, "Error from pthread call:\n");
- POCL_ABORT("%s", strerror(status));
+ POCL_ABORT("%s\n", strerror(status));
}
}
-@@ -435,7 +435,7 @@ get_hsa_device_features(char* dev_name,
+@@ -439,7 +439,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, "
@@ -41,7 +30,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
}
}
-@@ -1092,7 +1092,7 @@ pocl_hsa_compile_kernel (_cl_command_nod
+@@ -1077,7 +1077,7 @@ pocl_hsa_compile_kernel (_cl_command_nod
d->kernel_cache_lastptr++;
}
else
@@ -52,7 +41,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
--- 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
+@@ -446,7 +446,7 @@ pocl_tce_compile_kernel(_cl_command_node
#endif
error = system(buildCmd.c_str());
if (error != 0)
@@ -60,8 +49,8 @@ Description: consistently terminate POCL_ABORT messages with a newline
+ POCL_ABORT("Error while running tcecc.\n");
}
}
- }
-@@ -465,7 +465,7 @@ pocl_tce_run(void *data, _cl_command_nod
+
+@@ -479,7 +479,7 @@ pocl_tce_run(void *data, _cl_command_nod
d->restartProgram();
} catch (Exception &e) {
std::cerr << "error: " << e.errorMessage() << std::endl;
@@ -70,7 +59,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
}
const TTAProgram::Program* prog = d->currentProgram;
-@@ -476,7 +476,7 @@ pocl_tce_run(void *data, _cl_command_nod
+@@ -490,7 +490,7 @@ pocl_tce_run(void *data, _cl_command_nod
try {
kernelAddr = globalScope.dataLabel(kernelMdSymbolName).address().location();
} catch (const KeyNotFound& e) {
@@ -79,7 +68,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
}
// cache the currently device loaded kernel info
d->updateCurrentKernel(&(cmd->command.run), kernelAddr);
-@@ -641,7 +641,7 @@ pocl_tce_map_mem (void *data, void *buf_
+@@ -655,7 +655,7 @@ pocl_tce_map_mem (void *data, void *buf_
{
if (posix_memalign (&target, ALIGNMENT, size) != 0)
{
@@ -88,7 +77,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
}
}
-@@ -705,7 +705,7 @@ pocl_tce_build_hash (cl_device_id device
+@@ -719,7 +719,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)
@@ -99,7 +88,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
uint8_t bin_dig[SHA1_DIGEST_SIZE];
--- a/lib/CL/devices/tce/ttasim/ttasim.cc
+++ b/lib/CL/devices/tce/ttasim/ttasim.cc
-@@ -187,7 +187,7 @@ public:
+@@ -188,7 +188,7 @@ public:
const char *adf = strrchr(adfName, '/');
if (adf != NULL) adf++;
if (snprintf (dev_name, 256, "ttasim-%s", adf) < 0)
@@ -108,7 +97,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
dev->long_name = strdup(dev_name);
++device_count;
-@@ -489,7 +489,7 @@ pocl_ttasim_thread (void *p)
+@@ -490,7 +490,7 @@ pocl_ttasim_thread (void *p)
if (d->simulator.hadRuntimeError()) {
d->simulatorCLI.run();
@@ -117,9 +106,20 @@ Description: consistently terminate POCL_ABORT messages with a newline
}
} while (false);
} while (true);
---- a/lib/CL/pocl_llvm_api.cc
-+++ b/lib/CL/pocl_llvm_api.cc
-@@ -1187,7 +1187,7 @@ static const char* getX86KernelLibName()
+--- a/lib/CL/devices/cuda/pocl-ptx-gen.cc
++++ b/lib/CL/devices/cuda/pocl-ptx-gen.cc
+@@ -616,7 +616,7 @@ void linkLibDevice(llvm::Module *Module,
+ // Link libdevice into module.
+ llvm::Linker Linker(*Module);
+ if (Linker.linkInModule(std::move(LibDeviceModule.get()))) {
+- POCL_ABORT("[CUDA] failed to link to libdevice");
++ POCL_ABORT("[CUDA] failed to link to libdevice\n");
+ }
+
+ llvm::legacy::PassManager Passes;
+--- a/lib/CL/pocl_llvm_build.cc
++++ b/lib/CL/pocl_llvm_build.cc
+@@ -713,7 +713,7 @@ const char *getX86KernelLibName() {
if (Features["sse2"])
res = "sse2";
else
@@ -128,50 +128,32 @@ Description: consistently terminate POCL_ABORT messages with a newline
if (Features["ssse3"] && Features["cx16"])
res = "ssse3";
if (Features["sse4.1"] && Features["cx16"])
-@@ -1523,7 +1523,7 @@ static PassManager& kernel_compiler_pass
- else
- {
- std::cerr << "Failed to create kernel compiler pass " << passes[i] << std::endl;
-- POCL_ABORT("FAIL");
-+ POCL_ABORT("FAIL\n");
- }
- }
-
-@@ -1643,7 +1643,7 @@ kernel_library
- lib = ParseIRFile(kernellib_fallback.c_str(), Err, *GlobalContext());
+@@ -844,7 +844,7 @@ kernel_library
+ lib = parseModuleIR(kernellib_fallback.c_str());
}
else
- POCL_ABORT("Kernel library file %s doesn't exist.", kernellib.c_str());
+ POCL_ABORT("Kernel library file %s doesn't exist.\n", kernellib.c_str());
}
assert (lib != NULL);
- libs[device] = lib;
-@@ -1823,7 +1823,7 @@ void pocl_llvm_update_binaries (cl_progr
-
- size_t n = content.size();
- if (n < program->binary_sizes[i])
-- POCL_ABORT("binary size doesn't match the expected value");
-+ POCL_ABORT("binary size doesn't match the expected value\n");
- if (program->binaries[i])
- POCL_MEM_FREE(program->binaries[i]);
- program->binaries[i] = (unsigned char *) malloc(n);
---- a/lib/CL/pocl_queue_util.c
-+++ b/lib/CL/pocl_queue_util.c
-@@ -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");
+ kernelLibraryMap[device] = lib;
+--- a/lib/CL/pocl_llvm_wg.cc
++++ b/lib/CL/pocl_llvm_wg.cc
+@@ -354,7 +354,7 @@ kernel_compiler_passes(cl_device_id devi
+ } else {
+ std::cerr << "Failed to create kernel compiler pass " << passes[i]
+ << std::endl;
+- POCL_ABORT("FAIL");
++ POCL_ABORT("FAIL\n");
+ }
+ }
- //atexit(pocl_finish_all_queues);
+@@ -581,7 +581,7 @@ void pocl_llvm_update_binaries(cl_progra
-@@ -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)
-- POCL_ABORT("failed to enlarge queue list!");
-+ POCL_ABORT("failed to enlarge queue list!\n");
- queue_list = resized;
- queue_alloc += 256;
- }
+ size_t n = content.size();
+ if (n < program->binary_sizes[i])
+- POCL_ABORT("binary size doesn't match the expected value");
++ POCL_ABORT("binary size doesn't match the expected value\n");
+ if (program->binaries[i])
+ POCL_MEM_FREE(program->binaries[i]);
+ program->binaries[i] = (unsigned char *)malloc(n);
--
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