Post
Topic
Board Mining (Altcoins)
Topic OP
Minor Scrypt OpenCL optimization
by
psw
on 13/12/2013, 15:58:14 UTC
Hello,

I spent several days optimizing Scrypt OpenCL code. It was quite challenging, because my primary work and hobby is low-level optimization of code, especially the cryptographic one. SHA-256 is very familiar to me, in particular, I contributed in SHA-256 assembler optimization of OpenSSL code.

Concerning the current Scrypt OpenCL code, it's quite perfect. My first implementation was 10 times slower than that! Anyway, finally I've achieved a little speed-up. I have tested it in few AMD GPUs under Windows and latest AMD drivers (13.11), and the results are as follows:
HD 6770 and HD 7950 - 2-3%
HD 7770 - no change
R9 280x - haven't seen any changes in -g 2 mode, but there is again 2% in -g 1.

Here is the new OpenCL code: http://www.crark.net/download/scrypt130511.zip

Instructions:
0) Save your scrypt130511.cl file
1) Unzip and copy it (overwriting) to the cgminer folder. If your cgminer uses another filename (like scrypt130302.cl), rename file to this name.
All cgminer 3.x versions should be supported.
2) Delete all *.bin files (like scrypt130511Tahitiglg2tc8192w256l4.bin).
3) Restart cgminer and enjoy. All your previous settings, like lookup-gap and thread-concurrency should not be changed.

Please let me know of the results you were able to get, including your hardware and drivers version.
 If you like my work, please donate BTC or LTC.

SY, Pavel Semjanov.