mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 12:34:27 +00:00
add --hamsi-expand-big option for setting EXPAND_BIG in X13 kernels
This commit is contained in:
parent
5e3142cf68
commit
881355d873
@ -75,7 +75,9 @@ typedef long sph_s64;
|
|||||||
#define SPH_GROESTL_BIG_ENDIAN 0
|
#define SPH_GROESTL_BIG_ENDIAN 0
|
||||||
#define SPH_CUBEHASH_UNROLL 0
|
#define SPH_CUBEHASH_UNROLL 0
|
||||||
#define SPH_KECCAK_UNROLL 0
|
#define SPH_KECCAK_UNROLL 0
|
||||||
|
#if !defined SPH_HAMSI_EXPAND_BIG
|
||||||
#define SPH_HAMSI_EXPAND_BIG 4
|
#define SPH_HAMSI_EXPAND_BIG 4
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "blake.cl"
|
#include "blake.cl"
|
||||||
#include "bmw.cl"
|
#include "bmw.cl"
|
||||||
|
@ -75,7 +75,9 @@ typedef long sph_s64;
|
|||||||
#define SPH_GROESTL_BIG_ENDIAN 0
|
#define SPH_GROESTL_BIG_ENDIAN 0
|
||||||
#define SPH_CUBEHASH_UNROLL 0
|
#define SPH_CUBEHASH_UNROLL 0
|
||||||
#define SPH_KECCAK_UNROLL 0
|
#define SPH_KECCAK_UNROLL 0
|
||||||
|
#if !defined SPH_HAMSI_EXPAND_BIG
|
||||||
#define SPH_HAMSI_EXPAND_BIG 4
|
#define SPH_HAMSI_EXPAND_BIG 4
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "blake.cl"
|
#include "blake.cl"
|
||||||
#include "bmw.cl"
|
#include "bmw.cl"
|
||||||
|
@ -74,7 +74,9 @@ typedef long sph_s64;
|
|||||||
#define SPH_GROESTL_BIG_ENDIAN 0
|
#define SPH_GROESTL_BIG_ENDIAN 0
|
||||||
#define SPH_CUBEHASH_UNROLL 0
|
#define SPH_CUBEHASH_UNROLL 0
|
||||||
#define SPH_KECCAK_UNROLL 0
|
#define SPH_KECCAK_UNROLL 0
|
||||||
#define SPH_HAMSI_EXPAND_BIG 1
|
#if !defined SPH_HAMSI_EXPAND_BIG
|
||||||
|
#define SPH_HAMSI_EXPAND_BIG 4
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "blake.cl"
|
#include "blake.cl"
|
||||||
#include "bmw.cl"
|
#include "bmw.cl"
|
||||||
|
1
miner.h
1
miner.h
@ -956,6 +956,7 @@ extern bool opt_worktime;
|
|||||||
extern int swork_id;
|
extern int swork_id;
|
||||||
extern int opt_tcp_keepalive;
|
extern int opt_tcp_keepalive;
|
||||||
extern bool opt_incognito;
|
extern bool opt_incognito;
|
||||||
|
extern int opt_hamsi_expand_big;
|
||||||
|
|
||||||
#if LOCK_TRACKING
|
#if LOCK_TRACKING
|
||||||
extern pthread_mutex_t lockstat_lock;
|
extern pthread_mutex_t lockstat_lock;
|
||||||
|
3
ocl.c
3
ocl.c
@ -396,7 +396,8 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize, algorithm_t *alg
|
|||||||
build_data->patch_bfi = needs_bfi_patch(build_data);
|
build_data->patch_bfi = needs_bfi_patch(build_data);
|
||||||
|
|
||||||
set_base_compiler_options(build_data);
|
set_base_compiler_options(build_data);
|
||||||
append_scrypt_compiler_options(build_data, cgpu->lookup_gap, cgpu->thread_concurrency, algorithm->nfactor);
|
append_scrypt_compiler_options(build_data, cgpu->lookup_gap, cgpu->thread_concurrency, algorithm->nfactor);
|
||||||
|
append_hamsi_compiler_options(build_data, opt_hamsi_expand_big);
|
||||||
|
|
||||||
if (!(clState->program = build_opencl_kernel(build_data, filename)))
|
if (!(clState->program = build_opencl_kernel(build_data, filename)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -107,6 +107,16 @@ void append_scrypt_compiler_options(build_kernel_data *data, int lookup_gap, uns
|
|||||||
strcat(data->compiler_options, buf);
|
strcat(data->compiler_options, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: move away, specific
|
||||||
|
void append_hamsi_compiler_options(build_kernel_data *data, int expand_big)
|
||||||
|
{
|
||||||
|
char buf[255];
|
||||||
|
sprintf(buf, " -D SPH_HAMSI_EXPAND_BIG=%d",
|
||||||
|
expand_big);
|
||||||
|
|
||||||
|
strcat(data->compiler_options, buf);
|
||||||
|
}
|
||||||
|
|
||||||
cl_program build_opencl_kernel(build_kernel_data *data, const char *filename)
|
cl_program build_opencl_kernel(build_kernel_data *data, const char *filename)
|
||||||
{
|
{
|
||||||
int pl;
|
int pl;
|
||||||
|
@ -27,5 +27,6 @@ cl_program build_opencl_kernel(build_kernel_data *data, const char *filename);
|
|||||||
bool save_opencl_kernel(build_kernel_data *data, cl_program program);
|
bool save_opencl_kernel(build_kernel_data *data, cl_program program);
|
||||||
void set_base_compiler_options(build_kernel_data *data);
|
void set_base_compiler_options(build_kernel_data *data);
|
||||||
void append_scrypt_compiler_options(build_kernel_data *data, int lookup_gap, unsigned int thread_concurrency, unsigned int nfactor);
|
void append_scrypt_compiler_options(build_kernel_data *data, int lookup_gap, unsigned int thread_concurrency, unsigned int nfactor);
|
||||||
|
void append_hamsi_compiler_options(build_kernel_data *data, int expand_big);
|
||||||
|
|
||||||
#endif /* BUILD_KERNEL_H */
|
#endif /* BUILD_KERNEL_H */
|
||||||
|
@ -108,6 +108,7 @@ time_t last_getwork;
|
|||||||
int nDevs;
|
int nDevs;
|
||||||
int opt_dynamic_interval = 7;
|
int opt_dynamic_interval = 7;
|
||||||
int opt_g_threads = -1;
|
int opt_g_threads = -1;
|
||||||
|
int opt_hamsi_expand_big = 4;
|
||||||
bool opt_restart = true;
|
bool opt_restart = true;
|
||||||
|
|
||||||
struct list_head scan_devices;
|
struct list_head scan_devices;
|
||||||
@ -1343,6 +1344,9 @@ static struct opt_table opt_config_table[] = {
|
|||||||
OPT_WITH_ARG("--lookup-gap",
|
OPT_WITH_ARG("--lookup-gap",
|
||||||
set_lookup_gap, NULL, NULL,
|
set_lookup_gap, NULL, NULL,
|
||||||
"Set GPU lookup gap for scrypt mining, comma separated"),
|
"Set GPU lookup gap for scrypt mining, comma separated"),
|
||||||
|
OPT_WITH_ARG("--hamsi-expand-big",
|
||||||
|
set_int_1_to_10, opt_show_intval, &opt_hamsi_expand_big,
|
||||||
|
"Set SPH_HAMSI_EXPAND_BIG for X13 algorithms (1 or 4 are common)"),
|
||||||
#ifdef HAVE_CURSES
|
#ifdef HAVE_CURSES
|
||||||
OPT_WITHOUT_ARG("--incognito",
|
OPT_WITHOUT_ARG("--incognito",
|
||||||
opt_set_bool, &opt_incognito,
|
opt_set_bool, &opt_incognito,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user