Browse Source

Added command line option --astrobwt-max-size

pull/1590/head
XMRig 4 years ago
parent
commit
6cb27e9662
No known key found for this signature in database GPG Key ID: 446A53638BE94409
  1. 2
      CHANGELOG.md
  2. 1
      README.md
  3. 20
      src/backend/cpu/CpuConfig.h
  4. 1
      src/base/kernel/interfaces/IConfig.h
  5. 5
      src/core/config/ConfigTransform.cpp
  6. 3
      src/core/config/Config_platform.h
  7. 4
      src/core/config/usage.h

2
CHANGELOG.md

@ -1,5 +1,7 @@
# v5.9.0
- [#1578](https://github.com/xmrig/xmrig/pull/1578) Added new RandomKEVA algorithm for upcoming Kevacoin fork, as `"algo": "rx/keva"` or `"coin": "keva"`.
- [#1584](https://github.com/xmrig/xmrig/pull/1584) Fixed invalid AstroBWT hashes after algorithm switching.
- Added command line option `--astrobwt-max-size`.
# v5.8.2
- [#1580](https://github.com/xmrig/xmrig/pull/1580) AstroBWT algorithm 20-50% speedup.

1
README.md

@ -69,6 +69,7 @@ CPU backend:
--randomx-1gb-pages use 1GB hugepages for dataset (Linux only)
--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
--astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200
API:
--api-worker-id=ID custom worker-id for API

20
src/backend/cpu/CpuConfig.h

@ -58,8 +58,8 @@ public:
inline bool isYield() const { return m_yield; }
inline const Assembly &assembly() const { return m_assembly; }
inline const String &argon2Impl() const { return m_argon2Impl; }
inline int astrobwtMaxSize() const { return m_astrobwtMaxSize; }
inline const Threads<CpuThreads> &threads() const { return m_threads; }
inline int astrobwtMaxSize() const { return m_astrobwtMaxSize; }
inline int priority() const { return m_priority; }
inline uint32_t limit() const { return m_limit; }
@ -70,18 +70,18 @@ private:
inline void setPriority(int priority) { m_priority = (priority >= -1 && priority <= 5) ? priority : -1; }
AesMode m_aes = AES_AUTO;
AesMode m_aes = AES_AUTO;
Assembly m_assembly;
bool m_enabled = true;
bool m_hugePages = true;
bool m_shouldSave = false;
bool m_yield = true;
int m_memoryPool = 0;
int m_priority = -1;
bool m_enabled = true;
bool m_hugePages = true;
bool m_shouldSave = false;
bool m_yield = true;
int m_astrobwtMaxSize = 550;
int m_memoryPool = 0;
int m_priority = -1;
String m_argon2Impl;
int m_astrobwtMaxSize = 550;
Threads<CpuThreads> m_threads;
uint32_t m_limit = 100;
uint32_t m_limit = 100;
};

1
src/base/kernel/interfaces/IConfig.h

@ -97,6 +97,7 @@ public:
CPUMaxThreadsKey = 1026,
MemoryPoolKey = 1027,
YieldKey = 1030,
AstroBWTMaxSizeKey = 1034,
// xmrig amd
OclPlatformKey = 1400,

5
src/core/config/ConfigTransform.cpp

@ -156,6 +156,11 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
return set(doc, kCpu, "asm", arg);
# endif
# ifdef XMRIG_ALGO_ASTROBWT
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
return set(doc, kCpu, "astrobwt-max-size", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
# endif
# ifdef XMRIG_ALGO_RANDOMX
case IConfig::RandomXInitKey: /* --randomx-init */
return set(doc, kRandomX, "init", static_cast<int64_t>(strtol(arg, nullptr, 10)));

3
src/core/config/Config_platform.h

@ -107,6 +107,9 @@ static const option options[] = {
{ "randomx-no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
{ "no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
# endif
#ifdef XMRIG_ALGO_ASTROBWT
{ "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey },
#endif
# ifdef XMRIG_FEATURE_OPENCL
{ "opencl", 0, nullptr, IConfig::OclKey },
{ "opencl-devices", 1, nullptr, IConfig::OclDevicesKey },

4
src/core/config/usage.h

@ -94,6 +94,10 @@ static inline const std::string &usage()
u += " --randomx-no-rdmsr disable reverting initial MSR values on exit\n";
# endif
# ifdef XMRIG_ALGO_ASTROBWT
u += " --astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200\n";
# endif
# ifdef XMRIG_FEATURE_HTTP
u += "\nAPI:\n";
u += " --api-worker-id=ID custom worker-id for API\n";

Loading…
Cancel
Save