Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 Jun 2012 10:48:38 +0300
From: Milen Rangelov <gat3way@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: HD 7970 LDS Bank Conflicts

Sanyatan, as they have replied in AMD forum, worksize of 8 means you are
going to significantly underutilize the GPU (sh claims 1/32, but I think
wavefront is 64-wide thus it would be 1/8). This is far worse than
penalties from LDS bank conflicts. You will be also limited to 2
wavefronts/CU which additionally prevents you from hiding latency. Thus a
version that uses global memory might turn out faster. I would still put
some stuff in local memory. Eg you have

uint BF_current_P[20];


This is a good candidate for local memory, I would not leave it like that.
Arrays declared as local variables are almost always a bad idea, even if
they are backed by private memory, but in reality just very small arrays
do, it is more likely that the scratchpad memory is used instead which is
as slow as global. Also I am not sure if your calculations regarding
avoiding channel conflicts that involve division by 13 do not end up slower
than actually having the LDS conflicts because integer division and
especially modulus are very expensive.

If I were to optimize the opencl BF code I would first put what's
appropriate in local memory (obviously the 4KB state can't fit), then try
to eliminate divergence as much as I can (avoiding small inner loops by
unrolling, jam some loops, etc).

Unfortunately I am not quite interested in bcrypt and I never tried to do
that either on CPU or GPU. This looks like a nice OpenCL optimization
challenge though :)


On Tue, Jun 5, 2012 at 10:18 AM, SAYANTAN DATTA <std2048@...il.com> wrote:

>
>
> On Tue, Jun 5, 2012 at 12:29 PM, Solar Designer <solar@...nwall.com>wrote:
>
>> Hi Sayantan,
>>
>> On Tue, Jun 05, 2012 at 12:03:22AM +0530, SAYANTAN DATTA wrote:
>> > I have posted my problem to devgurus.amd.com and here's the link.
>> > http://devgurus.amd.com/message/1281717#1281717
>>
>> Why are you concerned about bank conflicts at this stage?  What's the
>> penalty for a bank conflict?  Have you estimated how often you will have
>> a bank conflict (as percentage of total LDS accesses perhaps) if you
>> don't try to avoid them?
>>
>> Can you just try to use LDS in whatever way and see what happens first?
>>
>> Alexander
>>
>
> Okay I will do that first.
>
>

Content of type "text/html" skipped

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.