Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM Support #1

Open
robertfoss opened this issue Nov 20, 2016 · 7 comments
Open

ARM Support #1

robertfoss opened this issue Nov 20, 2016 · 7 comments

Comments

@robertfoss
Copy link

I've had a look at this codebase and it is by far the nicest one out of the zcash miners I've seen.

With that being said, I would like to request ARM support:
ARMv7+NEON
ARMv8
ARMv8+NEON

@morpav
Copy link
Owner

morpav commented Nov 21, 2016

We're just porting it to windows. I guess it should not be a big deal to add some other build options. But I never did anything for ARM so any help or suggestion is greatly welcomed :)

@robertfoss
Copy link
Author

I think at this point even a non ASM implementation would be good. Any old C that just builds on an ARM platform would be an improvement.

@robertfoss
Copy link
Author

Cryptopp has a rather nice AVX/AVX2/NEON runtime selection.

BLAKE2_NEON_Compress32: https://github.com/weidai11/cryptopp/blob/master/blake2.cpp#L3466
BLAKE2_NEON_Compress64: https://github.com/weidai11/cryptopp/blob/master/blake2.cpp#L3972

@morpav
Copy link
Owner

morpav commented Nov 21, 2016

Thanks for the links.

I have thought a bit about the ARM port and the biggest issue I can see is that you have to use only aligned memory access (if I'm not mistaken). The solver is not designed with this limitation in mind and there are places where I deliberately choose non-aligned access patterns for performance reasons on x86-64. It can be quite non-trivial to port this because the algorithm itself cannot be the same.

@robertfoss
Copy link
Author

So going with a straight up C implementation covering all architectures
that don't have avx/sse available would probably be the better way that.
No need for NEON support or anything else fancy really.

On 21 November 2016 at 07:17, Pavel M. [email protected] wrote:

Thanks for the links.

I have thought a bit about the ARM port and the biggest issue I can see is
that you have to use only aligned memory access (if I'm not mistaken). The
solver is not designed with this limitation in mind and there are places
where I deliberately choose non-aligned access patterns for performance
reasons on x86-64. It can be quite non-trivial to port this because the
algorithm itself cannot be the same.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAf7_NFBQjqbRmjKn3PaBMJhD5SNBdihks5rAYvKgaJpZM4K3sDa
.

@morpav
Copy link
Owner

morpav commented Nov 21, 2016

NEON support is probably not an issue. I don't have experience these instruction with GCC/Clang but there should be a proper support in these compilers. As I said before, the biggest work to be done is to port the algorithm to work on architectures which require aligned memory accesses (C++ is not an issue by itself, compiler intrinsics for special instruction sets are not a huge issue too, etc.).

Can you explain me a little how serious is your motivation for having the code ported to ARM?

@robertfoss
Copy link
Author

The motivation for adding ARM support is the abundance of hardware.
Nearly everyone has a raspberry pi or two laying around.

ARM hardware is also only getting faster, A73 CPUs are not very much slower
than current
Intel CPUs. They too are only becoming more available.

This work would also prepare for cellphone minings, which sounds silly but
also
would let people use hardware they have laying around anyway.

On 21 November 2016 at 15:03, Pavel M. [email protected] wrote:

NEON support is probably not an issue. I don't have experience these
instruction with GCC/Clang but there should be a proper support in these
compilers. As I said before, the biggest work to be done is to port the
algorithm to work on architectures which require aligned memory accesses
(C++ is not an issue by itself, compiler intrinsics for special instruction
sets are not a huge issue too, etc.).

Can you explain me a little how serious is your motivation for having the
code ported to ARM?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAf7_KyspttDnGetY5ac56WK20NA55mgks5rAfkBgaJpZM4K3sDa
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants