diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-11-18 22:22:46 +0100 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-11-18 22:22:46 +0100 |
commit | 8bf8e8c86de634afe05f18d202d5ef7598f4091d (patch) | |
tree | b373c3eb410bf72c37b5e81fb8f23a338bad88fd /xmrstak/backend/amd/amd_gpu/gpu.cpp | |
parent | f50fa7d84d6cca05d0684c6f018ad5928301eafe (diff) | |
download | xmr-stak-8bf8e8c86de634afe05f18d202d5ef7598f4091d.zip xmr-stak-8bf8e8c86de634afe05f18d202d5ef7598f4091d.tar.gz |
fix max work size shown to user
The max work size shown to the user was the hardware maximum but not take in account thet some kernel spwning 8 times more threads per work group than configured by the 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 791ceb2..7098865 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); #ifdef CL_VERSION_2_0 const cl_queue_properties CommandQueueProperties[] = { 0, 0, 0 }; |