|
Message-ID: <CABh=JRHhi8BSXMyMToSPdr9hi0Ue2AEvvmdhAu1j8mJjzUgGoQ@mail.gmail.com>
Date: Sun, 9 Dec 2012 14:38:18 +0200
From: Milen Rangelov <gat3way@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: GCN: indexed access to VGPRs
Hello Solar,
I thought about that when doing the bcrypt kernel. There is one problem
with that though - we have a hard limit of 256 VGPRs per workitem and it
does not matter how many workitems per group we spawn, the limit stays even
if we run the kernel with worksize of say just 2 items (effectively that
means we'd underuse the register file a lot). So we can utilize at most 1KB
of registers for our sbox data. What eventually happens though is that the
compiler spills registers into global memory (and this register spill is
much worse than I expected). I tried having one of the 4 sboxes as a
private array and got a lot of spilled registers, the end result being
slower even given the increased occupancy and finally for some reason the
kernel was not calculating the hash correctly (might be mistake on my part
or a compiler issue, didn't investigate).
Perhaps though, smaller chunk of the sbox in VGPRs would be beneficial, I
just did not try that possibility.
However, I might have messed it up at some point, so I would not be very
surprised if you get better results than me.
On Sun, Dec 9, 2012 at 3:12 AM, Solar Designer <solar@...nwall.com> wrote:
> Sayantan, Milen, all -
>
> On page 53 in AMD_Southern_Islands_Instruction_Set_Architecture.pdf
> (SHA-1: c64c24077eab93b070d291da3624a8d988d70d5d), there's a mention
> that VGPRs may be indexed - something I had thought was not possible.
>
> This may let us use the vector register file to augment LDS, e.g. to
> compute a larger number of bcrypt hashes in parallel (some will have
> their S-boxes in LDS, and some more - in VGPRs). I guess we have
> spare VGPRs in our current bcrypt code (since we bump into LDS size
> first).
>
> I don't know if there's currently a way to access this functionality
> without going to a level lower than OpenCL or not, though.
>
> Alexander
>
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.