summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-04-22 20:02:22 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2018-06-04 21:07:11 +0000
commit864baffb78f00773dd7e976a9c16aeef4af82e4d (patch)
tree34cba04585ab92fe7c63b2203f932fc6b2c37668
parenta285ab397af3d3f826296c055995ac9d9089a7b3 (diff)
downloadxmr-stak-864baffb78f00773dd7e976a9c16aeef4af82e4d.zip
xmr-stak-864baffb78f00773dd7e976a9c16aeef4af82e4d.tar.gz
fix that cli option `--noAMDCache`
- fix that to much OpenCL calls whre used if cache is disabled
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index e44120b..736b6ae 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -476,14 +476,14 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_
}
while(status == CL_BUILD_IN_PROGRESS);
- std::vector<size_t> binary_sizes(num_devices);
- clGetProgramInfo (ctx->Program[ii], CL_PROGRAM_BINARY_SIZES, sizeof(size_t) * binary_sizes.size(), binary_sizes.data(), NULL);
-
- std::vector<char*> all_programs(num_devices);
- std::vector<std::vector<char>> program_storage;
-
if(xmrstak::params::inst().AMDCache)
{
+ std::vector<size_t> binary_sizes(num_devices);
+ clGetProgramInfo (ctx->Program[ii], CL_PROGRAM_BINARY_SIZES, sizeof(size_t) * binary_sizes.size(), binary_sizes.data(), NULL);
+
+ std::vector<char*> all_programs(num_devices);
+ std::vector<std::vector<char>> program_storage;
+
int p_id = 0;
size_t mem_size = 0;
// create memory structure to query all OpenCL program binaries
OpenPOWER on IntegriCloud