Kernel outputting CL_UNKNOWN_ERROR - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Misc (https://hashcat.net/forum/forum-15.html) +--- Forum: General Talk (https://hashcat.net/forum/forum-33.html) +--- Thread: Kernel outputting CL_UNKNOWN_ERROR (/thread-7591.html) |
Kernel outputting CL_UNKNOWN_ERROR - lehrling - 06-18-2018 Hello, Im developing a mode for an old file format. At some point in my code, I do something like; Code: __kernel function1() { This code fails at Code: *ptr2 = v1 >> 8; RE: Kernel outputting CL_UNKNOWN_ERROR - atom - 06-19-2018 From a C perspective it's fine (if we assumbe byte* is some 8 bit datatype), but in OpenCL everything is different. What I mean is that you have to find workarounds that do the same you try to do but are more easy for the compiler to understand. Try could try to use uchar* instead in the function declaration. But it's more likely that you can not make use of 8 bit datatypes, since they do not exist natively on a GPU. There's on 32 bit registers and that's it. So for example you can use a combination out of div and mod and switch() in order to emulate what you do with the cast. Anyway, welcome to my world RE: Kernel outputting CL_UNKNOWN_ERROR - lehrling - 06-26-2018 (06-19-2018, 09:47 AM)atom Wrote: From a C perspective it's fine (if we assumbe byte* is some 8 bit datatype), but in OpenCL everything is different. What I mean is that you have to find workarounds that do the same you try to do but are more easy for the compiler to understand. Thanks for the tips atom. I'll try to rewrite it. The code behavior is still not making much sense, but I'll try your sugestions. RE: Kernel outputting CL_UNKNOWN_ERROR - lehrling - 06-26-2018 Problem solved. I just changed my code from using the aligned data types to the unaligned data types, eg, u8a to u8. |