Skip to content

Commit

Permalink
reverted attempts to stagger kernel runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mining-visualizer committed Apr 27, 2018
1 parent c82fd48 commit d0a3421
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cmake global
cmake_minimum_required(VERSION 2.8.12)

set(PROJECT_VERSION "2.1.12")
set(PROJECT_VERSION "2.1.13")
if (${CMAKE_VERSION} VERSION_GREATER 3.0)
cmake_policy(SET CMP0042 OLD) # fix MACOSX_RPATH
cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project()
Expand Down
9 changes: 1 addition & 8 deletions libethash-cl/ethash_cl_miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ using namespace std;
using namespace dev;

unsigned const ethash_cl_miner::c_defaultLocalWorkSize = 128;
unsigned const ethash_cl_miner::c_defaultWorkSizeMultiplier = 32768;
unsigned const ethash_cl_miner::c_defaultWorkSizeMultiplier = 196608;

unsigned const c_nonceLinear = 1;
unsigned const c_nonceRandom = 2;
Expand Down Expand Up @@ -774,7 +774,6 @@ void ethash_cl_miner::search(bytes _challenge, uint64_t _target, h160 _miningAcc
Timer kernelTimer;
// put in a rough guess for now, in case we are throttling
int kernelTime = 100;
Timer kernelLaunch;
int batchCount = 0;

{
Expand Down Expand Up @@ -858,15 +857,9 @@ void ethash_cl_miner::search(bytes _challenge, uint64_t _target, h160 _miningAcc
m_searchKernel.setArg(0, m_precompBuffer[m_buf]);
m_searchKernel.setArg(1, m_searchBuffer[m_buf]);

// make sure the kernel runs are staggered to hide latency here on the host
if (kernelLaunch.elapsedMilliseconds() < 10)
this_thread::sleep_for(chrono::milliseconds(10));

m_queue[m_buf].enqueueNDRangeKernel(m_searchKernel, cl::NullRange, m_globalWorkSize, s_workgroupSize);
m_pending.push_back({nonce, m_buf});

kernelLaunch.restart();

m_results[m_buf] = (search_results*) m_queue[m_buf].enqueueMapBuffer(m_searchBuffer[m_buf], CL_FALSE, CL_MAP_READ, 0,
sizeof(search_results), 0, &m_mapEvents[m_buf]);
m_buf = (m_buf + 1) % l_bufferCount;
Expand Down

0 comments on commit d0a3421

Please sign in to comment.