diff options
author | psychocrypt <psychocryptHPC@gmail.com> | 2018-04-14 23:17:33 +0200 |
---|---|---|
committer | psychocrypt <psychocryptHPC@gmail.com> | 2018-04-14 23:26:27 +0200 |
commit | 4682b28a5d304436ca20469e5089f97814f3f4ab (patch) | |
tree | 001fb739475e440047eb37b9dadb49b13ccb1a61 /xmrstak/cli/cli-miner.cpp | |
parent | 9158460bdc316fe9d6f1fb01095b5aff52c1acf8 (diff) | |
download | xmr-stak-4682b28a5d304436ca20469e5089f97814f3f4ab.zip xmr-stak-4682b28a5d304436ca20469e5089f97814f3f4ab.tar.gz |
allow non AMD OpenCL driver and devices
- add CLI flag to explicitly use non AMD OpenCL and devices
- adjust OpenCL output (use OpenCL instead of AMD if --altOpenCL is sued)
- optimize NVIDIA OpenCL auto suggestion
Diffstat (limited to 'xmrstak/cli/cli-miner.cpp')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index c425f04..6118682 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -80,6 +80,8 @@ void help() #ifndef CONF_NO_OPENCL cout<<" --noAMD disable the AMD miner backend"<<endl; cout<<" --noAMDCache disable the AMD(OpenCL) cache for precompiled binaries"<<endl; + cout<<" --openCLVendor VENDOR use OpenCL driver of VENDOR and devices [AMD,NVIDIA]"<<endl; + cout<<" default: AMD"<<endl; cout<<" --amd FILE AMD backend miner config file"<<endl; #endif #ifndef CONF_NO_CUDA @@ -450,6 +452,24 @@ int main(int argc, char *argv[]) { params::inst().useAMD = false; } + else if(opName.compare("--openCLVendor") == 0) + { + ++i; + if( i >=argc ) + { + printer::inst()->print_msg(L0, "No argument for parameter '--openCLVendor' given"); + win_exit(); + return 1; + } + std::string vendor(argv[i]); + params::inst().openCLVendor = vendor; + if(vendor != "AMD" && vendor != "NVIDIA") + { + printer::inst()->print_msg(L0, "'--openCLVendor' must be 'AMD' or 'NVIDIA'"); + win_exit(); + return 1; + } + } else if(opName.compare("--noAMDCache") == 0) { params::inst().AMDCache = false; |