summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-12-09 10:34:11 +0000
committerGitHub <noreply@github.com>2017-12-09 10:34:11 +0000
commit30888a31368d6d1e2f459e611b634df39cbcc857 (patch)
tree2ced2fcd72a4608e0c1ee7c8dcea44661a72a3ba
parenta29e7d5e61ab7f3910db7c5d6b378e48b933caef (diff)
parent6b739ece97ae0fa3432ce32a82f53ddc40488eed (diff)
downloadxmr-stak-2.1.0.zip
xmr-stak-2.1.0.tar.gz
Merge pull request #423 from psychocrypt/topic-moreConservativeNvidiaAutosuggestionv2.1.0
conservative NVIDIA auto suggestion
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
index 492201d..734426c 100644
--- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
+++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
@@ -404,7 +404,7 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
( props.major < 3 ? 2 : 3 );
// increase bfactor for low end devices to avoid that the miner is killed by the OS
- if(props.multiProcessorCount < 6)
+ if(props.multiProcessorCount <= 6)
ctx->device_bfactor += 2;
}
if(ctx->device_threads == -1)
@@ -418,6 +418,19 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
// no limit by default 1TiB
size_t maxMemUsage = byteToMiB * byteToMiB;
+ if(props.major == 6)
+ {
+ if(props.multiProcessorCount < 15)
+ {
+ // limit memory usage for GPUs for pascal < GTX1070
+ maxMemUsage = size_t(2048u) * byteToMiB;
+ }
+ else if(props.multiProcessorCount <= 20)
+ {
+ // limit memory usage for GPUs for pascal GTX1070, GTX1080
+ maxMemUsage = size_t(4096u) * byteToMiB;
+ }
+ }
if(props.major < 6)
{
// limit memory usage for GPUs before pascal
OpenPOWER on IntegriCloud