summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/nvidia/nvcc_code
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2017-12-08 23:42:43 +0100
committerpsychocrypt <psychocryptHPC@gmail.com>2017-12-08 23:42:43 +0100
commita317606af96f56cfd40574ee93a836682caec840 (patch)
tree3cc9f633178cde1424a5738a3920cfd2e7e8a557 /xmrstak/backend/nvidia/nvcc_code
parent1b9906080826de11cbd3bd237be4b85d9598da65 (diff)
downloadxmr-stak-a317606af96f56cfd40574ee93a836682caec840.zip
xmr-stak-a317606af96f56cfd40574ee93a836682caec840.tar.gz
conservative NVIDIA auto suggestion
Be more conservative with the auto suggestion. - increase bfactor if `smx <= 6` - limit memory for pascal < GTX1070 to 2GiB - limt memory for pascal <= GTX1080 to 4GiB
Diffstat (limited to 'xmrstak/backend/nvidia/nvcc_code')
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu13
1 files changed, 12 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..6135caf 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,17 @@ 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