Skip to content
Snippets Groups Projects
Unverified Commit a317606a authored by psychocrypt's avatar psychocrypt
Browse files

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
parent 1b990608
No related branches found
No related tags found
No related merge requests found
...@@ -404,7 +404,7 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx) ...@@ -404,7 +404,7 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
( props.major < 3 ? 2 : 3 ); ( props.major < 3 ? 2 : 3 );
// increase bfactor for low end devices to avoid that the miner is killed by the OS // 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; ctx->device_bfactor += 2;
} }
if(ctx->device_threads == -1) if(ctx->device_threads == -1)
...@@ -418,6 +418,17 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx) ...@@ -418,6 +418,17 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
// no limit by default 1TiB // no limit by default 1TiB
size_t maxMemUsage = byteToMiB * byteToMiB; 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) if(props.major < 6)
{ {
// limit memory usage for GPUs before pascal // limit memory usage for GPUs before pascal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment