Open FreeTrade opened 2 years ago
have a look in config.ac - this is the line that switches the flags off -
CFLAGS="$CFLAGS -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512"
Ok removed it and start to compile as for now its ok
fails all time I think it is related to files inside blake3 folder
Yes, I was only able to get it to compile by putting this kludge in the make file. I'm sure a make file wizard could have this compiling to a single binary with all the optimizations that only kick-in when the required CPU features are available. It's beyond my skills though.
hmmm, i was able to get it to compile by using the
CFLAGS="-march=skylake-avx512"
with CONFIG_SITE=
However the miner crashes running it on different hardware, so i guess this will compile with the optimizations, but will crash on a computer that doesn't have the CPU instructions.
Miners may be able to gain optimizations by compiling it on the machine they are running it with and compiling with CFLAGS="-march=native"
more details on compiling here - looks like each of the files needs to be compiled with different processor switches. https://github.com/BLAKE3-team/BLAKE3/blob/master/c/README.md#x86
Could handle this by either setting make file to compile each blake3 file with the correct compiler option OR compiling the blake3 into a shared library (easy to do), then having the miner use that shared library (couldn't get that to work)
left sse and avx2 flags on. possible additional gains if avx512 switch properly added.
All compiler flags are switched off for lowest common denominator compile. Should be possible to improve mining and validation performance by improving make files to switch on compiler flags where appropriate.