diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-11-18 21:46:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-18 21:46:01 +0000 |
commit | 36079b9311a3e21502869360b6a2cbb530a99a1a (patch) | |
tree | fa26ae57da2541d75ab5d87c9ce6f4ec6ba49093 /xmrstak/backend/amd/amd_gpu/gpu.cpp | |
parent | 07a6f84810a6fc026bc4a990419a1bd1850f414e (diff) | |
parent | 8bf8e8c86de634afe05f18d202d5ef7598f4091d (diff) | |
download | xmr-stak-36079b9311a3e21502869360b6a2cbb530a99a1a.zip xmr-stak-36079b9311a3e21502869360b6a2cbb530a99a1a.tar.gz |
Merge pull request #138 from psychocrypt/fix-amdMaxWorkSize
fix max work size shown to user
Diffstat (limited to 'xmrstak/backend/amd/amd_gpu/gpu.cpp')
-rw-r--r-- | xmrstak/backend/amd/amd_gpu/gpu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index 12b356c..15b8457 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -226,6 +226,10 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_ return ERR_OCL_API; } + /* Some kernel spawn 8 times more threads than the user is configuring. + * To give the user the correct maximum work size we divide the hardware specific max by 8. + */ + MaximumWorkSize /= 8; printer::inst()->print_msg(L1,"Device %lu work size %lu / %lu.", ctx->deviceIdx, ctx->workSize, MaximumWorkSize); #if defined(CL_VERSION_2_0) && !defined(CONF_ENFORCE_OpenCL_1_2) const cl_queue_properties CommandQueueProperties[] = { 0, 0, 0 }; |