1
0
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:
Tanguy Pruvot 2018-08-03 20:01:14 +02:00
parent 370684f743
commit 4a76ca5cb6
4 changed files with 26 additions and 5 deletions

View File

@ -156,6 +156,22 @@ bool bench_algo_switch_next(int thr_id)
if (algo == ALGO_SCRYPT) 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
mused = cuda_available_memory(thr_id);
algo_free_all(thr_id);

View File

@ -2384,6 +2384,9 @@ static void *miner_thread(void *userdata)
case ALGO_CRYPTOLIGHT:
rc = scanhash_cryptolight(thr_id, &work, max_nonce, &hashes_done, 1);
break;
case ALGO_MONERO:
case ALGO_STELLITE:
case ALGO_GRAFT:
case ALGO_CRYPTONIGHT:
{
int cn_variant = 0;

View File

@ -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],
mem, device_mpcount[dev_id]);
if (!device_config[thr_id] && strcmp(device_name[dev_id], "TITAN V") == 0) {
device_config[thr_id] = strdup("80x24");
if (!device_config[thr_id]) {
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]) {
@ -83,7 +86,7 @@ extern "C" int scanhash_cryptonight(int thr_id, struct work* work, uint32_t max_
CUDA_LOG_ERROR();
}
const size_t alloc = MEMORY * throughput;
const size_t alloc = MEMORY * size_t(throughput);
cryptonight_extra_init(thr_id);
cudaMalloc(&d_long_state[thr_id], alloc);

View File

@ -183,8 +183,7 @@ extern "C" int scanhash_equihash(int thr_id, struct work *work, uint32_t max_non
return -1;
}
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, gpus_intensity[thr_id]);
api_set_throughput(thr_id, (uint32_t) solvers[thr_id]->throughput);
gpulog(LOG_DEBUG, thr_id, "Allocated %u MB of context memory", (u32) memSz);
cuda_get_arch(thr_id);
init[thr_id] = true;