Skip to content

Commit

Permalink
Merging kernels
Browse files Browse the repository at this point in the history
Merging cm's kernels into gen's codebase
  • Loading branch information
goobur committed Aug 28, 2017
1 parent 91530aa commit 7292963
Show file tree
Hide file tree
Showing 20 changed files with 95,854 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ project.pbxproj
doc/html
*.autosave
node_modules/
Win32/Debug/BuildInfo.h/BuildInfo.h.log
*.log
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function(createBuildInfo)
endfunction()


hunter_add_package(Boost COMPONENTS system)
find_package(Boost CONFIG REQUIRED COMPONENTS system)
hunter_add_package(Boost COMPONENTS system regex)
find_package(Boost CONFIG REQUIRED COMPONENTS system regex)

hunter_add_package(jsoncpp)
find_package(jsoncpp CONFIG REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions ethminer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})

add_dependencies(${EXECUTABLE} BuildInfo.h)

target_link_libraries(${EXECUTABLE} ${Boost_LIBRARIES})
target_link_libraries(${EXECUTABLE} ethcore)
target_link_libraries(${EXECUTABLE} ethash)
target_link_libraries(${EXECUTABLE} devcore libjson-rpc-cpp::client)
Expand Down
28 changes: 25 additions & 3 deletions ethminer/MinerAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,17 @@ class MinerCLI
break;
}
}
else if ((arg == "--eth-intensity" || arg == "-eint") && i + 1 < argc) {
try {
m_ethereumAsmIntensity = stol(argv[++i]);
}
catch (...)
{
cerr << "Bad " << arg << " option: " << argv[i] << endl;
BOOST_THROW_EXCEPTION(BadArgument());
}
}

#endif
#if ETH_ETHASHCL || ETH_ETHASHCUDA
else if ((arg == "--cl-global-work" || arg == "--cuda-grid-size") && i + 1 < argc)
Expand All @@ -283,6 +294,10 @@ class MinerCLI
}
else if (arg == "--list-devices")
m_shouldListDevices = true;
else if ((arg == "--optimize" || arg == "-asv") && i + 1 < argc) {
m_optimizationKernel = stol(argv[++i]);
m_optimizationKernel = m_optimizationKernel < 0 ? 0 : (m_optimizationKernel >= 4 ? 4 : m_optimizationKernel);
}
#endif
#if ETH_ETHASHCUDA
else if (arg == "--cuda-devices")
Expand Down Expand Up @@ -476,7 +491,9 @@ class MinerCLI
m_openclPlatform,
0,
m_dagLoadMode,
m_dagCreateDevice
m_dagCreateDevice,
m_optimizationKernel,
m_ethereumAsmIntensity
))
exit(1);
CLMiner::setNumInstances(m_miningThreads);
Expand Down Expand Up @@ -515,7 +532,7 @@ class MinerCLI
if (mode == OperationMode::Benchmark)
doBenchmark(m_minerType, m_benchmarkWarmup, m_benchmarkTrial, m_benchmarkTrials);
else if (mode == OperationMode::Farm)
doFarm(m_minerType, m_activeFarmURL, m_farmRecheckPeriod);
doFarm(m_minerType, m_activeFarmURL, m_farmRecheckPeriod);
else if (mode == OperationMode::Simulation)
doSimulation(m_minerType);
#if ETH_STRATUM
Expand Down Expand Up @@ -750,16 +767,19 @@ class MinerCLI
::FarmClient rpcFailover(failoverClient);

FarmClient * prpc = &rpc;

h256 id = h256::random();
Farm f;
f.setSealers(sealers);


if (_m == MinerType::CL)
f.start("opencl", false);
else if (_m == MinerType::CUDA)
f.start("cuda", false);
WorkPackage current;
std::mutex x_current;

while (m_running)
try
{
Expand Down Expand Up @@ -981,6 +1001,8 @@ class MinerCLI
#if ETH_ETHASHCL
unsigned m_openclDeviceCount = 0;
unsigned m_openclDevices[16];
unsigned m_ethereumAsmIntensity = 8;
unsigned m_optimizationKernel = 1;
#if !ETH_ETHASHCUDA
unsigned m_globalWorkSizeMultiplier = CLMiner::c_defaultGlobalWorkSizeMultiplier;
unsigned m_localWorkSize = CLMiner::c_defaultLocalWorkSize;
Expand Down
4,357 changes: 4,357 additions & 0 deletions libethash-cl/CLASM_baffin.h

Large diffs are not rendered by default.

4,357 changes: 4,357 additions & 0 deletions libethash-cl/CLASM_ellesmere1.h

Large diffs are not rendered by default.

4,357 changes: 4,357 additions & 0 deletions libethash-cl/CLASM_ellesmere2.h

Large diffs are not rendered by default.

4,380 changes: 4,380 additions & 0 deletions libethash-cl/CLASM_fiji.h

Large diffs are not rendered by default.

50,320 changes: 50,320 additions & 0 deletions libethash-cl/CLASM_generic.h

Large diffs are not rendered by default.

4,346 changes: 4,346 additions & 0 deletions libethash-cl/CLASM_hawaii.h

Large diffs are not rendered by default.

4,347 changes: 4,347 additions & 0 deletions libethash-cl/CLASM_pitcarin.h

Large diffs are not rendered by default.

4,347 changes: 4,347 additions & 0 deletions libethash-cl/CLASM_tahiti.h

Large diffs are not rendered by default.

4,380 changes: 4,380 additions & 0 deletions libethash-cl/CLASM_tonga1.h

Large diffs are not rendered by default.

4,380 changes: 4,380 additions & 0 deletions libethash-cl/CLASM_tonga2.h

Large diffs are not rendered by default.

5,925 changes: 5,925 additions & 0 deletions libethash-cl/CLASM_vega.h

Large diffs are not rendered by default.

Loading

0 comments on commit 7292963

Please sign in to comment.