reduce memory usage for low end gpus

reduce memory usage to 1GiB for NVIDIA devices with <=6 SMX
This commit is contained in:
psychocrypt
2018-01-22 21:02:05 +01:00
parent 8731717488
commit ea6c147ab2
@@ -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