summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/nvidia/nvcc_code
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-01-22 21:02:05 +0100
committerpsychocrypt <psychocryptHPC@gmail.com>2018-01-22 21:02:05 +0100
commitea6c147ab201a703c9eec1f5cd03fde670ded4d9 (patch)
tree603154bbbb7d2d60aa310522e91cc61b6beba771 /xmrstak/backend/nvidia/nvcc_code
parent87317174886d43ac8db7a458f7b8329525ada271 (diff)
downloadxmr-stak-ea6c147ab201a703c9eec1f5cd03fde670ded4d9.zip
xmr-stak-ea6c147ab201a703c9eec1f5cd03fde670ded4d9.tar.gz
reduce memory usage for low end gpus
reduce memory usage to 1GiB for NVIDIA devices with <=6 SMX
Diffstat (limited to 'xmrstak/backend/nvidia/nvcc_code')
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
index d865e13..d5d0039 100644
--- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
+++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
@@ -441,6 +441,12 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
maxMemUsage = size_t(1024u) * byteToMiB;
}
+ if(props.multiProcessorCount <= 6)
+ {
+ // limit memory usage for low end devices to reduce the number of threads
+ maxMemUsage = size_t(1024u) * byteToMiB;
+ }
+
int* tmp;
cudaError_t err;
// a device must be selected to get the right memory usage later on
OpenPOWER on IntegriCloud