mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-19 03:00:07 +00:00
bench: handle cryptonight variants + V100 fix
This commit is contained in:
parent
370684f743
commit
4a76ca5cb6
16
bench.cpp
16
bench.cpp
@ -156,6 +156,22 @@ bool bench_algo_switch_next(int thr_id)
|
|||||||
if (algo == ALGO_SCRYPT) algo++;
|
if (algo == ALGO_SCRYPT) algo++;
|
||||||
if (algo == ALGO_SCRYPT_JANE) algo++;
|
if (algo == ALGO_SCRYPT_JANE) algo++;
|
||||||
|
|
||||||
|
// Set cryptonight variant
|
||||||
|
switch (algo) {
|
||||||
|
case ALGO_MONERO:
|
||||||
|
cryptonight_fork = 7;
|
||||||
|
break;
|
||||||
|
case ALGO_GRAFT:
|
||||||
|
cryptonight_fork = 8;
|
||||||
|
break;
|
||||||
|
case ALGO_STELLITE:
|
||||||
|
cryptonight_fork = 3;
|
||||||
|
break;
|
||||||
|
case ALGO_CRYPTONIGHT:
|
||||||
|
cryptonight_fork = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// free current algo memory and track mem usage
|
// free current algo memory and track mem usage
|
||||||
mused = cuda_available_memory(thr_id);
|
mused = cuda_available_memory(thr_id);
|
||||||
algo_free_all(thr_id);
|
algo_free_all(thr_id);
|
||||||
|
@ -2384,6 +2384,9 @@ static void *miner_thread(void *userdata)
|
|||||||
case ALGO_CRYPTOLIGHT:
|
case ALGO_CRYPTOLIGHT:
|
||||||
rc = scanhash_cryptolight(thr_id, &work, max_nonce, &hashes_done, 1);
|
rc = scanhash_cryptolight(thr_id, &work, max_nonce, &hashes_done, 1);
|
||||||
break;
|
break;
|
||||||
|
case ALGO_MONERO:
|
||||||
|
case ALGO_STELLITE:
|
||||||
|
case ALGO_GRAFT:
|
||||||
case ALGO_CRYPTONIGHT:
|
case ALGO_CRYPTONIGHT:
|
||||||
{
|
{
|
||||||
int cn_variant = 0;
|
int cn_variant = 0;
|
||||||
|
@ -50,8 +50,11 @@ extern "C" int scanhash_cryptonight(int thr_id, struct work* work, uint32_t max_
|
|||||||
gpulog_init(LOG_INFO, thr_id, "%s, %d MB available, %hd SMX", device_name[dev_id],
|
gpulog_init(LOG_INFO, thr_id, "%s, %d MB available, %hd SMX", device_name[dev_id],
|
||||||
mem, device_mpcount[dev_id]);
|
mem, device_mpcount[dev_id]);
|
||||||
|
|
||||||
if (!device_config[thr_id] && strcmp(device_name[dev_id], "TITAN V") == 0) {
|
if (!device_config[thr_id]) {
|
||||||
device_config[thr_id] = strdup("80x24");
|
if(strcmp(device_name[dev_id], "TITAN V") == 0)
|
||||||
|
device_config[thr_id] = strdup("80x24");
|
||||||
|
if(strstr(device_name[dev_id], "V100"))
|
||||||
|
device_config[thr_id] = strdup("80x24");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device_config[thr_id]) {
|
if (device_config[thr_id]) {
|
||||||
@ -83,7 +86,7 @@ extern "C" int scanhash_cryptonight(int thr_id, struct work* work, uint32_t max_
|
|||||||
CUDA_LOG_ERROR();
|
CUDA_LOG_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t alloc = MEMORY * throughput;
|
const size_t alloc = MEMORY * size_t(throughput);
|
||||||
cryptonight_extra_init(thr_id);
|
cryptonight_extra_init(thr_id);
|
||||||
|
|
||||||
cudaMalloc(&d_long_state[thr_id], alloc);
|
cudaMalloc(&d_long_state[thr_id], alloc);
|
||||||
|
@ -183,8 +183,7 @@ extern "C" int scanhash_equihash(int thr_id, struct work *work, uint32_t max_non
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
size_t memSz = solvers[thr_id]->equi_mem_sz / (1024*1024);
|
size_t memSz = solvers[thr_id]->equi_mem_sz / (1024*1024);
|
||||||
gpus_intensity[thr_id] = (uint32_t) solvers[thr_id]->throughput;
|
api_set_throughput(thr_id, (uint32_t) solvers[thr_id]->throughput);
|
||||||
api_set_throughput(thr_id, gpus_intensity[thr_id]);
|
|
||||||
gpulog(LOG_DEBUG, thr_id, "Allocated %u MB of context memory", (u32) memSz);
|
gpulog(LOG_DEBUG, thr_id, "Allocated %u MB of context memory", (u32) memSz);
|
||||||
cuda_get_arch(thr_id);
|
cuda_get_arch(thr_id);
|
||||||
init[thr_id] = true;
|
init[thr_id] = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user