Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Apr 2012 21:01:19 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: fast hashes on GPU

On Wed, Apr 04, 2012 at 12:34:06AM +0800, myrice wrote:
> I already thought of this. The fmt_self_test also calls set_key. It will
> disturb the condition you said. I am thinking that for testing purpose, we
> could set up a flag in bench_set_keys() or comment out fmt_self_test in
> benchmark_format.

This makes sense to me.

> From cuda profiler, I see cuda_cmp_all(My new function, already push to
> github) only occupied 0.5% time.

You're transferring the computed hashes to the host anyway, right?
You'd need to avoid that (postpone it to the time that the first
get_hash*() or cmp_one() call is made - hoping that one won't be made).

Anyway, I've just tried your code on my GTX 570 1600 MHz.

Your original code from github with no changes:

Benchmarking: Mac OS X 10.7+ salted SHA-512 CUDA [64/64]... DONE
Many salts:     22053K c/s real, 22053K c/s virtual
Only one salt:  14818K c/s real, 14818K c/s virtual

sm_10 changed to sm_20:

Many salts:     20072K c/s real, 20193K c/s virtual
Only one salt:  13953K c/s real, 13953K c/s virtual

Hmm, it became slower.  More changes:

#define BLOCKS 1024
#define THREADS 480

Many salts:     24192K c/s real, 24382K c/s virtual
Only one salt:  17146K c/s real, 17146K c/s virtual

Back to sm_10 (but keeping the BLOCKS and THREADS change):

Many salts:     27162K c/s real, 26926K c/s virtual
Only one salt:  18432K c/s real, 18432K c/s virtual

BINARY_SIZE reduced to 8 (and other related changes):

Benchmarking: Mac OS X 10.7+ salted SHA-512 [CUDA]... DONE
Many salts:     52019K c/s real, 52019K c/s virtual
Only one salt:  27403K c/s real, 27403K c/s virtual

This is starting to look a lot better.

I've attached the patch - please review and likely apply.

Alexander

View attachment "xsha512-cuda.diff" of type "text/plain" (3469 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.