From 3fab2792fd8bda233836082132e65500a950c00a Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Mon, 6 Feb 2017 04:38:43 +0100 Subject: [PATCH] lyra2: remove old debug traces --- lyra2/lyra2RE.cu | 19 ++----------------- lyra2/lyra2REv2.cu | 26 ++------------------------ 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/lyra2/lyra2RE.cu b/lyra2/lyra2RE.cu index 4cacbb9..e25aba4 100644 --- a/lyra2/lyra2RE.cu +++ b/lyra2/lyra2RE.cu @@ -6,8 +6,8 @@ extern "C" { #include "lyra2/Lyra2.h" } -#include "miner.h" -#include "cuda_helper.h" +#include +#include static uint64_t* d_hash[MAX_GPUS]; static uint64_t* d_matrix[MAX_GPUS]; @@ -31,20 +31,6 @@ extern void groestl256_setTarget(const void *ptarget); extern uint32_t groestl256_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNounce, uint64_t *d_outputHash, int order); extern uint32_t groestl256_getSecNonce(int thr_id, int num); -#ifdef _DEBUG -#define TRACE(algo) { \ - if (max_nonce == 1 && pdata[19] <= 1) { \ - uint32_t* debugbuf = NULL; \ - cudaMallocHost(&debugbuf, 8*sizeof(uint32_t)); \ - cudaMemcpy(debugbuf, d_hash[thr_id], 8*sizeof(uint32_t), cudaMemcpyDeviceToHost); \ - printf("lyra %s %08x %08x %08x %08x...\n", algo, swab32(debugbuf[0]), swab32(debugbuf[1]), \ - swab32(debugbuf[2]), swab32(debugbuf[3])); \ - cudaFreeHost(debugbuf); \ - } \ -} -#else -#define TRACE(algo) {} -#endif extern "C" void lyra2re_hash(void *state, const void *input) { @@ -141,7 +127,6 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce, keccak256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); lyra2_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], gtx750ti); skein256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("S") *hashes_done = pdata[19] - first_nonce + throughput; diff --git a/lyra2/lyra2REv2.cu b/lyra2/lyra2REv2.cu index c148372..15ca59d 100644 --- a/lyra2/lyra2REv2.cu +++ b/lyra2/lyra2REv2.cu @@ -7,9 +7,8 @@ extern "C" { #include "lyra2/Lyra2.h" } -#include "miner.h" -#include "cuda_helper.h" - +#include +#include static uint64_t *d_hash[MAX_GPUS]; static uint64_t* d_matrix[MAX_GPUS]; @@ -73,21 +72,6 @@ void lyra2v2_hash(void *state, const void *input) memcpy(state, hashA, 32); } -#ifdef _DEBUG -#define TRACE(algo) { \ - if (max_nonce == 1 && pdata[19] <= 1) { \ - uint32_t* debugbuf = NULL; \ - cudaMallocHost(&debugbuf, 32); \ - cudaMemcpy(debugbuf, d_hash[thr_id], 32, cudaMemcpyDeviceToHost); \ - printf("lyra2 %s %08x %08x %08x %08x...%08x... \n", algo, swab32(debugbuf[0]), swab32(debugbuf[1]), \ - swab32(debugbuf[2]), swab32(debugbuf[3]), swab32(debugbuf[7])); \ - cudaFreeHost(debugbuf); \ - } \ -} -#else -#define TRACE(algo) {} -#endif - static bool init[MAX_GPUS] = { 0 }; extern "C" int scanhash_lyra2v2(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done) @@ -145,17 +129,11 @@ extern "C" int scanhash_lyra2v2(int thr_id, struct work* work, uint32_t max_nonc int order = 0; blake256_cpu_hash_80(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("blake :"); keccak256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("keccak :"); cubehash256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("cube :"); lyra2v2_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("lyra2 :"); skein256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], order++); - TRACE("skein :"); cubehash256_cpu_hash_32(thr_id, throughput,pdata[19], d_hash[thr_id], order++); - TRACE("cube :"); memset(work->nonces, 0, sizeof(work->nonces)); bmw256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], work->nonces);