Merge pull request #950 from psychocrypt/topic-reduceMemoryForSlowNvidiaGPUs

reduce memory usage for low end gpus
This commit is contained in:
fireice-uk
2018-01-26 21:21:56 +00:00
committed by GitHub
@@ -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