Closed kayabaNerve closed 4 years ago
Problem is https://github.com/MerosCrypto/mc_randomx/blob/4532ee1e7ddf70cdabec7dd91eda6fdffdb911b4/mc_randomx.nimble#L45. We should be able to rip an env var from Nimble, and if one's not set, default to native. Then from our docker file, we need to set said environment variable.
Mineros also has a docker file. I'm not exactly sure how to handle that given its performance versus portability. Given that a miner is all about performance, I think we should just leave that docker file alone and add a comment linking to this issue.
Fixed via https://github.com/MerosCrypto/mc_randomx/commit/aadd493d8d33993afc2222f00aea1af0481acbba.
While the env variable offers the ability to optimize, the miner is already heavily non-optimized (see the fact it only runs on a single thread). I rather quickly fix the Docker image and come back to this later, in a separate issue under Mineros, when there's a need for more full-featured work.
RandomX detects its building on an AVX-512 CPU, which is a beneficial optimization, don't get me wrong. That said, AVX-512 isn't supported on a wide variety of CPUs, all the way up to Intel i*-7s to Ryzen 2s. This lack of portability goes against the advantages of using a Docker image.
Credit goes to @PlasmaPower for discovering this issue.