Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit 18b0c2a

Browse files
committedFeb 6, 2018
Rename alternate kernel to more representative name
As I understand this so called unstable kernel was indeed faster and stable on some GPUs
1 parent dab3410 commit 18b0c2a

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed
 

‎ethminer/MinerAux.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,7 @@ class MinerCLI
643643
<< " OpenCL configuration:" << endl
644644
<< " --cl-kernel <n> Use a different OpenCL kernel (default: use stable kernel)" << endl
645645
<< " 0: stable kernel" << endl
646-
<< " 1: unstable kernel" << endl
647-
// << " 2: experimental kernel" << endl
646+
<< " 1: experimental kernel" << endl
648647
<< " --cl-local-work Set the OpenCL local work size. Default is " << CLMiner::c_defaultLocalWorkSize << endl
649648
<< " --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is " << CLMiner::c_defaultGlobalWorkSizeMultiplier << " * " << CLMiner::c_defaultLocalWorkSize << endl
650649
<< " --cl-parallel-hash <1 2 ..8> Define how many threads to associate per hash. Default=8" << endl

‎libethash-cl/CLMiner.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "CLMiner.h"
77
#include <libethash/internal.h>
88
#include "CLMiner_kernel_stable.h"
9-
#include "CLMiner_kernel_unstable.h"
9+
#include "CLMiner_kernel_experimental.h"
1010

1111
using namespace dev;
1212
using namespace eth;
@@ -630,7 +630,7 @@ bool CLMiner::init(const h256& seed)
630630

631631
if ( s_clKernelName == CLKernelName::Unstable ) {
632632
cllog << "OpenCL kernel: Unstable kernel";
633-
code = string(CLMiner_kernel_unstable, CLMiner_kernel_unstable + sizeof(CLMiner_kernel_unstable));
633+
code = string(CLMiner_kernel_experimental, CLMiner_kernel_experimental + sizeof(CLMiner_kernel_experimental));
634634
}
635635
else { //if(s_clKernelName == CLKernelName::Stable)
636636
cllog << "OpenCL kernel: Stable kernel";

‎libethash-cl/CLMiner_kernel_unstable.cl ‎libethash-cl/CLMiner_kernel_experimental.cl

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
// Either 8, 4, 2, or 1
3434
#ifndef THREADS_PER_HASH
35-
#define THREADS_PER_HASH 1
35+
#define THREADS_PER_HASH 2
3636
#endif
3737
#define HASHES_PER_LOOP (GROUP_SIZE / THREADS_PER_HASH)
3838

‎libethash-cl/CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ add_custom_command(
1616
add_custom_target(clbin2h_stable DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_stable.h ${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_stable.cl)
1717

1818
add_custom_command(
19-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_unstable.h
19+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_experimental.h
2020
COMMAND ${CMAKE_COMMAND} ARGS
21-
-DBIN2H_SOURCE_FILE="${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_unstable.cl"
22-
-DBIN2H_VARIABLE_NAME=CLMiner_kernel_unstable
23-
-DBIN2H_HEADER_FILE="${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_unstable.h"
21+
-DBIN2H_SOURCE_FILE="${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_experimental.cl"
22+
-DBIN2H_VARIABLE_NAME=CLMiner_kernel_experimental
23+
-DBIN2H_HEADER_FILE="${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_experimental.h"
2424
-P "${CMAKE_CURRENT_SOURCE_DIR}/bin2h.cmake"
2525
COMMENT "Generating OpenCL Kernel Byte Array"
26-
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_unstable.cl
26+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_experimental.cl
2727
)
28-
add_custom_target(clbin2h_unstable DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_unstable.h ${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_unstable.cl)
28+
add_custom_target(clbin2h_experimental DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_experimental.h ${CMAKE_CURRENT_SOURCE_DIR}/CLMiner_kernel_experimental.cl)
2929

3030
set(SOURCES
3131
CLMiner.h CLMiner.cpp
3232
${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_stable.h
33-
${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_unstable.h
33+
${CMAKE_CURRENT_BINARY_DIR}/CLMiner_kernel_experimental.h
3434
)
3535

3636
if(APPLE)

0 commit comments

Comments
 (0)
This repository has been archived.