Questions about kernels (a0/1/2/3), kernel functions (mXXXXXm/mXXXXXs) and debugging
#1
I'd like to add a new algorithm to hashcat (3.00). It seems to me that e.g. https://github.com/hashcat/oclHashcat/co...2ac427179c
 is a good starting point. I've got some questions though: 

In the diffs I see that four kernels are added: OpenCL/m*_a[0-3].cl. Why 4? What's the use of a0/a1/a2/a3? On my test setup, using a3 only works. When / why are the other kernels needed?

In the OpenCL kernel (in my case a3, see above) I see two funtions that seem to contain the core code: mXXXXXm and mXXXXXs, where XXXXX is the number of the algorithm. During implementation of my first algoritms I mentioned that in my test setup I only need to change  mXXXXXs: I can even comment critical parts of mXXXXXm without affecting the outcome of tests. When / why is the mXXXXXm function needed?


Can somebody provide me with tips 'n tricks for debugging OpenCL kernels? I'm looking for ways to check values of variables etc., thing like a printf that runs / triggers from the kernel and displays data to console out.

Thank you for your help.

John
Reply
#2
OP: I merged your threads and subsequently merged your posts. You're having troubles adding a new algorithm, we get it. There's no reason to create 4 separate threads that all deal with the same topic. Please contain your anxiety. If someone can & wants to answer, they will.
Reply