Skip to content
Snippets Groups Projects
Unverified Commit abae75d4 authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #132 from psychocrypt/fix-nvidiaAutoSuggestion

fix nvidia auto suggestion
parents 51c7b26e d326644d
No related branches found
No related tags found
No related merge requests found
......@@ -467,9 +467,9 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx)
// 200byte are meta data memory (result nonce, ...)
size_t availableMem = freeMemory - (128u * byteToMiB) - 200u;
size_t limitedMemory = std::min(availableMem, maxMemUsage);
// up to 1kibyte extra memory is used per thread for some kernel (lmem/local memory)
// up to 16kibyte extra memory is used per thread for some kernel (lmem/local memory)
// 680bytes are extra meta data memory per hash
size_t perThread = hashMemSize + 1024u + 680u;
size_t perThread = hashMemSize + 16192u + 680u;
size_t max_intensity = limitedMemory / perThread;
ctx->device_threads = max_intensity / ctx->device_blocks;
// use only odd number of threads
......
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