xmr-stak-cpu icon indicating copy to clipboard operation
xmr-stak-cpu copied to clipboard

Need Sparc and PowerPC Support

Open megapyhor opened this issue 7 years ago • 10 comments

megapyhor avatar Jun 26 '17 14:06 megapyhor

I can provide access to necessary architectures

megapyhor avatar Jun 28 '17 20:06 megapyhor

Do you mean OpenPower? It is intresting but I need to say that I am not sure if the community with such system architectures is large enough. The point is that the port will cost a lot of time and IMO the time will be better invested in porting the miner to arm.

Could you point out why this system could be a good miner architecture. I know that Power8 has hardware AES units but I don't know the throughput.

psychocrypt avatar Jun 28 '17 20:06 psychocrypt

i mean https://www.redbooks.ibm.com/abstracts/tips0880.html

megapyhor avatar Jun 28 '17 21:06 megapyhor

SPARC processors since T4 have included AES instructions. https://blogs.oracle.com/danx/sparc-t4-openssl-engine

MostParsingVex avatar Aug 21 '17 01:08 MostParsingVex

So i've actually started working on this for sparc64. Getting around the SSE2 requirements is easy enough by incorporating https://github.com/nemequ/simde. In my testing this provide no performance penalty on my i7 7700K as it simply forwards native instructions if available.

The next major issue is the aes-ni instructions. It seems they are being called directly in cryptonight_aesni.h. Is there a reason not to use the OS's built in cyrpto API's and let the kernel figure out hardware acceleration? Or does this result in a performance penalty @psychocrypt

SIN3R6Y avatar Nov 14 '17 22:11 SIN3R6Y

I've written some code in cpuminer-multi to take advantage of the Sparc T4 AES instructions which I could port to XMR-Stak? I used cpuminer-multi as I'm building on Solaris 11.3 which is stuck in the past as far as compiler support goes. My Sparc T4-1 system currently only does 30-50h/s on 8 virtual cores but I've not done much optimisation yet.

Can you tell me what build setup you plan to use so I can duplicate it? I can see that Solaris 11.3 can supposedly do gcc 5.1... but I couldn't figure out the crazy package masking system to get it to work.

oforpertainingtothesun avatar Jan 03 '18 14:01 oforpertainingtothesun

@SIN3R6Y: AFAIK the AES used in Monero is different from normal AES.

yuhong avatar Jan 15 '18 04:01 yuhong

@yuhong it is, they are calling the cpu instructions directly rather than going through the kernel api. Perhaps this provides some cross platform functionality?

SIN3R6Y avatar Jan 18 '18 22:01 SIN3R6Y

The point is that the one used in Monero is slightly different, so simply feeding a key to a standard AES code isn't enough.

yuhong avatar Jan 20 '18 00:01 yuhong

@megapyhor I've made the necessary changes to the PPCle conversion in this repository here:

https://github.com/oforpertainingtothesun/xmr-stak-sparc

It will also work for PPC big endian (as the original PPC conversion doesn't) so could be used (slowly) on Power 7 and earlier or on AIX.

Apologies for the lengthy build requirements, seems like Oracle have made a veritable dogs dinner of their GCC builds and don't appear to contribute much to GNU binutils. I can produce a binary release if you need me to including the GCC libs.

Out of interest, what (vaguely) are your Sparc machines normally doing? My day-job involves tooling for these machines and we're looking at supporting migration paths from Sparc to Linux on either x86 or PPCbe.

oforpertainingtothesun avatar Jan 29 '18 11:01 oforpertainingtothesun