Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Jun 2013 13:30:16 +0200
From: Dániel Bali <balijanosdaniel@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: sha3-opencl

Hello!

2013/6/9 Lukas Odzioba <lukas.odzioba@...il.com>
>
> Daniel please share with us current (we added longer test vectors)
> speeds on 7970, 570 and bulls cpu (using opencl implementation).
>

CPU version:
Bull's CPU  --  1139K c/s
AMD FX 8120  --  1127K c/s

OpenCL version:
GeForce GTX  --  21748K c/s
Radeon HD 7970  --  12787K c/s
AMD FX 8120  --  3693K c/s

The performance compared to Dhiru's version is quite poor. I will probably
work on this in my freetime though.

Some more comments to code:
> 1) This loop is generating duplicates:
>         // (Hack) clear output buffers first
>       for (i = 0; i < 32; ++i) {
>               hashes[(i/4) * num_keys + gid] = 0;
>       }
> Lets assume:
>     int num_keys=1024;
>     int gid=5;
>     for (i = 0; i < 32; ++i) {
>             printf("%d ",(i/4) * num_keys + gid);
>       }
> And we are getting: 5 5 5 5 1029 1029 1029 1029 2053 2053 2053 2053
> 3077 3077 3077 3077 4101 4101 4101 4101 5125 5125 5125 5125 6149 6149
> 6149 6149 7173 7173 7173 7173
>

Oh you are right. I lazily copied the loop in the kernel from below that
runs 32 times and never thought about this.
Changing this didn't improve the performance though.

3) I am curious what ISA code is generated by those macros:
>
> #define GETCHAR(buf, index) ((uchar)(buf >> index * 8) & 0xff)
> #define PUTCHAR(buf, index, val) (buf |= (val << index * 8))
>
> Usually it is better to make reads/writes to global memory 32bit wide.
> If you have some free time tomorrow you can check this out.
> Next week we will move to more serious tasks.
>

In JtR's code where could I turn on the option that saves the generated ISA?


> 4) You can try to run opencl profiler and share here some of the
> results of this analysis. I have some intuition but it is an exercise
> for you.
>

I would be interested to see this. What profiler should I use?


> How did you liked this task?
>

I like the task, it made me a bit more familiar with JtR's codebase and how
OpenCL code works with JtR.

Regards,
Daniel

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ