diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 20:50:51 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 21:40:38 +0200 |
commit | 3e091d9251bf0d67c27efa5183d24cff7cbe9b50 (patch) | |
tree | 1fe67113efda926b59969b5525ac7cdaad1563b2 /xmrstak | |
parent | c192b97b67bf648540bf058f21b7873bfe886a82 (diff) | |
download | xmr-stak-3e091d9251bf0d67c27efa5183d24cff7cbe9b50.zip xmr-stak-3e091d9251bf0d67c27efa5183d24cff7cbe9b50.tar.gz |
increase safety memory for autosuggestion
- increase safty memory from 64 to 128 MiB
- NVIDIA: increase lmem reserve per thread to 1kiB
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/backend/amd/autoAdjust.hpp | 4 | ||||
-rw-r--r-- | xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp index 87e6299..8f9aa50 100644 --- a/xmrstak/backend/amd/autoAdjust.hpp +++ b/xmrstak/backend/amd/autoAdjust.hpp @@ -97,8 +97,8 @@ private: int i = 0; for(auto& ctx : devVec) { - // keep 64MiB memory free (value is randomly chosen) - size_t availableMem = ctx.freeMem - (64u * 1024 * 1024); + // keep 128MiB memory free (value is randomly chosen) + size_t availableMem = ctx.freeMem - (128u * byteToMiB); // 224byte extra memory is used per thread for meta data size_t perThread = hashMemSize + 224u; size_t max_intensity = availableMem / perThread; diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu index abca489..b161258 100644 --- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu +++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu @@ -332,19 +332,19 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx) * `8 * ctx->device_threads` threads per block */ ctx->device_threads = 64; - constexpr size_t byte2mib = 1024u * 1024u; + constexpr size_t byteToMiB = 1024u * 1024u; // no limit by default 1TiB - size_t maxMemUsage = byte2mib * byte2mib; + size_t maxMemUsage = byteToMiB * byteToMiB; if(props.major < 6) { // limit memory usage for GPUs before pascal - maxMemUsage = size_t(2048u) * byte2mib; + maxMemUsage = size_t(2048u) * byteToMiB; } if(props.major == 2) { // limit memory usage for sm 20 GPUs - maxMemUsage = size_t(1024u) * byte2mib; + maxMemUsage = size_t(1024u) * byteToMiB; } size_t freeMemory = 0; @@ -364,13 +364,13 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx) hashMemSize = AEON_MEMORY; } - // keep 64MiB memory free (value is randomly chosen) + // keep 128MiB memory free (value is randomly chosen) // 200byte are meta data memory (result nonce, ...) - size_t availableMem = freeMemory - (64u * 1024 * 1024) - 200u; + size_t availableMem = freeMemory - (128u * byteToMiB) - 200u; size_t limitedMemory = std::min(availableMem, maxMemUsage); - // up to 920bytes extra memory is used per thread for some kernel (lmem/local memory) + // up to 1kibyte extra memory is used per thread for some kernel (lmem/local memory) // 680bytes are extra meta data memory per hash - size_t perThread = hashMemSize + 740u + 680u; + size_t perThread = hashMemSize + 1024u + 680u; size_t max_intensity = limitedMemory / perThread; ctx->device_threads = max_intensity / ctx->device_blocks; // use only odd number of threads |