mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-08 20:09:52 +00:00
Added command line option --astrobwt-avx2
This commit is contained in:
parent
1986b45acd
commit
92a258f142
11 changed files with 16 additions and 9 deletions
|
@ -68,6 +68,7 @@ CPU backend:
|
||||||
--randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)
|
--randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)
|
||||||
--randomx-no-rdmsr disable reverting initial MSR values on exit
|
--randomx-no-rdmsr disable reverting initial MSR values on exit
|
||||||
--astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200
|
--astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200
|
||||||
|
--astrobwt-avx2 enable AVX2 optimizations for AstroBWT algorithm
|
||||||
|
|
||||||
API:
|
API:
|
||||||
--api-worker-id=ID custom worker-id for API
|
--api-worker-id=ID custom worker-id for API
|
||||||
|
|
|
@ -52,7 +52,7 @@ static const char *kArgon2Impl = "argon2-impl";
|
||||||
|
|
||||||
#ifdef XMRIG_ALGO_ASTROBWT
|
#ifdef XMRIG_ALGO_ASTROBWT
|
||||||
static const char* kAstroBWTMaxSize = "astrobwt-max-size";
|
static const char* kAstroBWTMaxSize = "astrobwt-max-size";
|
||||||
static const char* kAstroBWTAVX2 = "astrobwt-avx2";
|
static const char* kAstroBWTAVX2 = "astrobwt-avx2";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ rapidjson::Value xmrig::CpuConfig::toJSON(rapidjson::Document &doc) const
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ASTROBWT
|
# ifdef XMRIG_ALGO_ASTROBWT
|
||||||
obj.AddMember(StringRef(kAstroBWTMaxSize), m_astrobwtMaxSize, allocator);
|
obj.AddMember(StringRef(kAstroBWTMaxSize), m_astrobwtMaxSize, allocator);
|
||||||
obj.AddMember(StringRef(kAstroBWTAVX2), m_astrobwtAVX2, allocator);
|
obj.AddMember(StringRef(kAstroBWTAVX2), m_astrobwtAVX2, allocator);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
m_threads.toJSON(obj, doc);
|
m_threads.toJSON(obj, doc);
|
||||||
|
|
|
@ -73,12 +73,12 @@ private:
|
||||||
|
|
||||||
AesMode m_aes = AES_AUTO;
|
AesMode m_aes = AES_AUTO;
|
||||||
Assembly m_assembly;
|
Assembly m_assembly;
|
||||||
|
bool m_astrobwtAVX2 = false;
|
||||||
bool m_enabled = true;
|
bool m_enabled = true;
|
||||||
bool m_hugePages = true;
|
bool m_hugePages = true;
|
||||||
bool m_shouldSave = false;
|
bool m_shouldSave = false;
|
||||||
bool m_yield = true;
|
bool m_yield = true;
|
||||||
int m_astrobwtMaxSize = 550;
|
int m_astrobwtMaxSize = 550;
|
||||||
bool m_astrobwtAVX2 = false;
|
|
||||||
int m_memoryPool = 0;
|
int m_memoryPool = 0;
|
||||||
int m_priority = -1;
|
int m_priority = -1;
|
||||||
String m_argon2Impl;
|
String m_argon2Impl;
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
xmrig::CpuLaunchData::CpuLaunchData(const Miner *miner, const Algorithm &algorithm, const CpuConfig &config, const CpuThread &thread) :
|
xmrig::CpuLaunchData::CpuLaunchData(const Miner *miner, const Algorithm &algorithm, const CpuConfig &config, const CpuThread &thread) :
|
||||||
algorithm(algorithm),
|
algorithm(algorithm),
|
||||||
assembly(config.assembly()),
|
assembly(config.assembly()),
|
||||||
|
astrobwtAVX2(config.astrobwtAVX2()),
|
||||||
hugePages(config.isHugePages()),
|
hugePages(config.isHugePages()),
|
||||||
hwAES(config.isHwAES()),
|
hwAES(config.isHwAES()),
|
||||||
yield(config.isYield()),
|
yield(config.isYield()),
|
||||||
astrobwtMaxSize(config.astrobwtMaxSize()),
|
astrobwtMaxSize(config.astrobwtMaxSize()),
|
||||||
astrobwtAVX2(config.astrobwtAVX2()),
|
|
||||||
priority(config.priority()),
|
priority(config.priority()),
|
||||||
affinity(thread.affinity()),
|
affinity(thread.affinity()),
|
||||||
miner(miner),
|
miner(miner),
|
||||||
|
|
|
@ -58,11 +58,11 @@ public:
|
||||||
|
|
||||||
const Algorithm algorithm;
|
const Algorithm algorithm;
|
||||||
const Assembly assembly;
|
const Assembly assembly;
|
||||||
|
const bool astrobwtAVX2;
|
||||||
const bool hugePages;
|
const bool hugePages;
|
||||||
const bool hwAES;
|
const bool hwAES;
|
||||||
const bool yield;
|
const bool yield;
|
||||||
const int astrobwtMaxSize;
|
const int astrobwtMaxSize;
|
||||||
const bool astrobwtAVX2;
|
|
||||||
const int priority;
|
const int priority;
|
||||||
const int64_t affinity;
|
const int64_t affinity;
|
||||||
const Miner *miner;
|
const Miner *miner;
|
||||||
|
|
|
@ -77,11 +77,11 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
|
||||||
Worker(id, data.affinity, data.priority),
|
Worker(id, data.affinity, data.priority),
|
||||||
m_algorithm(data.algorithm),
|
m_algorithm(data.algorithm),
|
||||||
m_assembly(data.assembly),
|
m_assembly(data.assembly),
|
||||||
|
m_astrobwtAVX2(data.astrobwtAVX2),
|
||||||
m_hwAES(data.hwAES),
|
m_hwAES(data.hwAES),
|
||||||
m_yield(data.yield),
|
m_yield(data.yield),
|
||||||
m_av(data.av()),
|
m_av(data.av()),
|
||||||
m_astrobwtMaxSize(data.astrobwtMaxSize * 1000),
|
m_astrobwtMaxSize(data.astrobwtMaxSize * 1000),
|
||||||
m_astrobwtAVX2(data.astrobwtAVX2),
|
|
||||||
m_miner(data.miner),
|
m_miner(data.miner),
|
||||||
m_ctx()
|
m_ctx()
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,11 +70,11 @@ private:
|
||||||
|
|
||||||
const Algorithm m_algorithm;
|
const Algorithm m_algorithm;
|
||||||
const Assembly m_assembly;
|
const Assembly m_assembly;
|
||||||
|
const bool m_astrobwtAVX2;
|
||||||
const bool m_hwAES;
|
const bool m_hwAES;
|
||||||
const bool m_yield;
|
const bool m_yield;
|
||||||
const CnHash::AlgoVariant m_av;
|
const CnHash::AlgoVariant m_av;
|
||||||
const int m_astrobwtMaxSize;
|
const int m_astrobwtMaxSize;
|
||||||
const bool m_astrobwtAVX2;
|
|
||||||
const Miner *m_miner;
|
const Miner *m_miner;
|
||||||
cryptonight_ctx *m_ctx[N];
|
cryptonight_ctx *m_ctx[N];
|
||||||
uint8_t m_hash[N * 32]{ 0 };
|
uint8_t m_hash[N * 32]{ 0 };
|
||||||
|
|
|
@ -98,6 +98,7 @@ public:
|
||||||
MemoryPoolKey = 1027,
|
MemoryPoolKey = 1027,
|
||||||
YieldKey = 1030,
|
YieldKey = 1030,
|
||||||
AstroBWTMaxSizeKey = 1034,
|
AstroBWTMaxSizeKey = 1034,
|
||||||
|
AstroBWTAVX2Key = 1036,
|
||||||
|
|
||||||
// xmrig amd
|
// xmrig amd
|
||||||
OclPlatformKey = 1400,
|
OclPlatformKey = 1400,
|
||||||
|
|
|
@ -159,6 +159,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
||||||
# ifdef XMRIG_ALGO_ASTROBWT
|
# ifdef XMRIG_ALGO_ASTROBWT
|
||||||
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
|
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
|
||||||
return set(doc, kCpu, "astrobwt-max-size", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
return set(doc, kCpu, "astrobwt-max-size", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||||
|
|
||||||
|
case IConfig::AstroBWTAVX2Key: /* --astrobwt-avx2 */
|
||||||
|
return set(doc, kCpu, "astrobwt-avx2", true);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_RANDOMX
|
# ifdef XMRIG_ALGO_RANDOMX
|
||||||
|
|
|
@ -110,6 +110,7 @@ static const option options[] = {
|
||||||
# endif
|
# endif
|
||||||
#ifdef XMRIG_ALGO_ASTROBWT
|
#ifdef XMRIG_ALGO_ASTROBWT
|
||||||
{ "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey },
|
{ "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey },
|
||||||
|
{ "astrobwt-avx2", 0, nullptr, IConfig::AstroBWTAVX2Key },
|
||||||
#endif
|
#endif
|
||||||
# ifdef XMRIG_FEATURE_OPENCL
|
# ifdef XMRIG_FEATURE_OPENCL
|
||||||
{ "opencl", 0, nullptr, IConfig::OclKey },
|
{ "opencl", 0, nullptr, IConfig::OclKey },
|
||||||
|
|
|
@ -96,6 +96,7 @@ static inline const std::string &usage()
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ASTROBWT
|
# ifdef XMRIG_ALGO_ASTROBWT
|
||||||
u += " --astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200\n";
|
u += " --astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200\n";
|
||||||
|
u += " --astrobwt-avx2 enable AVX2 optimizations for AstroBWT algorithm";
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
|
|
Loading…
Reference in a new issue