#1285 Added command line options --cuda-bfactor-hint and --cuda-bsleep-hint.

This commit is contained in:
XMRig 2019-11-15 03:10:58 +07:00
parent 79f4685d9a
commit aeb2c6e8ec
5 changed files with 16 additions and 0 deletions

View file

@ -195,6 +195,12 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::CudaDevicesKey: /* --cuda-devices */
set(doc, kCuda, kEnabled, true);
return set(doc, kCuda, "devices-hint", arg);
case IConfig::CudaBFactorKey: /* --cuda-bfactor-hint */
return set(doc, kCuda, "bfactor-hint", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
case IConfig::CudaBSleepKey: /* --cuda-bsleep-hint */
return set(doc, kCuda, "bsleep-hint", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
# endif
# ifdef XMRIG_FEATURE_NVML

View file

@ -108,6 +108,8 @@ static const option options[] = {
{ "cuda", 0, nullptr, IConfig::CudaKey },
{ "cuda-loader", 1, nullptr, IConfig::CudaLoaderKey },
{ "cuda-devices", 1, nullptr, IConfig::CudaDevicesKey },
{ "cuda-bfactor-hint", 1, nullptr, IConfig::CudaBFactorKey },
{ "cuda-bsleep-hint", 1, nullptr, IConfig::CudaBSleepKey },
# endif
# ifdef XMRIG_FEATURE_NVML
{ "no-nvml", 0, nullptr, IConfig::NvmlKey },

View file

@ -113,6 +113,8 @@ static inline const std::string &usage()
u += " --cuda enable CUDA mining backend\n";
u += " --cuda-loader=PATH path to CUDA plugin (xmrig-cuda.dll or libxmrig-cuda.so)\n";
u += " --cuda-devices=N comma separated list of CUDA devices to use\n";
u += " --cuda-bfactor-hint=N bfactor hint for autoconfig (0-12)\n";
u += " --cuda-bsleep-hint=N bsleep hint for autoconfig\n";
# endif
# ifdef XMRIG_FEATURE_NVML
u += " --no-nvml disable NVML (NVIDIA Management Library) support\n";