Added command line options "--randomx-init" and "--randomx-no-numa".

This commit is contained in:
XMRig 2019-07-28 11:01:30 +07:00
parent 2fb88f10b8
commit bbcacbc1d4
5 changed files with 21 additions and 1 deletions

View file

@ -83,8 +83,9 @@ public:
DryRunKey = 5000, DryRunKey = 5000,
HugePagesKey = 1009, HugePagesKey = 1009,
ThreadsKey = 't', ThreadsKey = 't',
// HardwareAESKey = 1011,
AssemblyKey = 1015, AssemblyKey = 1015,
RandomXInitKey = 1022,
RandomXNumaKey = 1023,
// xmrig amd // xmrig amd
OclPlatformKey = 1400, OclPlatformKey = 1400,

View file

@ -41,7 +41,10 @@
namespace xmrig { namespace xmrig {
static const char *kCPU = "cpu"; static const char *kCPU = "cpu";
#ifdef XMRIG_ALGO_RANDOMX
static const char *kRandomX = "randomx"; static const char *kRandomX = "randomx";
#endif
} }

View file

@ -36,6 +36,7 @@ static const char *kAffinity = "affinity";
static const char *kAsterisk = "*"; static const char *kAsterisk = "*";
static const char *kCpu = "cpu"; static const char *kCpu = "cpu";
static const char *kIntensity = "intensity"; static const char *kIntensity = "intensity";
static const char *kRandomX = "randomx";
static inline uint64_t intensity(uint64_t av) static inline uint64_t intensity(uint64_t av)
@ -165,6 +166,14 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
return set(doc, kCpu, "asm", arg); return set(doc, kCpu, "asm", arg);
# endif # endif
# ifdef XMRIG_ALGO_RANDOMX
case IConfig::RandomXInitKey: /* --randomx-init */
return set(doc, kRandomX, "init", static_cast<int64_t>(strtol(arg, nullptr, 10)));
case IConfig::RandomXNumaKey: /* --randomx-no-numa */
return set(doc, kRandomX, "numa", false);
# endif
default: default:
break; break;
} }

View file

@ -81,6 +81,8 @@ static const option options[] = {
{ "asm", 1, nullptr, IConfig::AssemblyKey }, { "asm", 1, nullptr, IConfig::AssemblyKey },
{ "daemon", 0, nullptr, IConfig::DaemonKey }, { "daemon", 0, nullptr, IConfig::DaemonKey },
{ "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey }, { "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey },
{ "randomx-init", 1, nullptr, IConfig::RandomXInitKey },
{ "randomx-no-numa", 0, nullptr, IConfig::RandomXNumaKey },
{ nullptr, 0, nullptr, 0 } { nullptr, 0, nullptr, 0 }
}; };

View file

@ -108,6 +108,11 @@ Options:\n\
--http-access-token=T access token for HTTP API\n\ --http-access-token=T access token for HTTP API\n\
--http-no-restricted enable full remote access to HTTP API (only if access token set)\n" --http-no-restricted enable full remote access to HTTP API (only if access token set)\n"
#endif #endif
#ifdef XMRIG_ALGO_RANDOMX
"\
--randomx-init=N threads count to initialize RandomX dataset\n\
--randomx-no-numa disable NUMA support for RandomX\n"
#endif
"\ "\
--dry-run test configuration and exit\n\ --dry-run test configuration and exit\n\
-h, --help display this help and exit\n\ -h, --help display this help and exit\n\