From f2dfd82ab7f447d67b0dd613116a278fe6ad7097 Mon Sep 17 00:00:00 2001 From: KlausT Date: Fri, 1 May 2015 18:38:27 +0200 Subject: [PATCH] remove MyStreamSynchronize --- Algo256/blake256.cu | 2 -- cuda_nist5.cu | 2 -- lyra2/lyra2RE.cu | 3 --- pentablake.cu | 6 ------ qubit/deep.cu | 1 - qubit/doom.cu | 2 -- qubit/qubit.cu | 2 -- x11/fresh.cu | 1 - x11/s3.cu | 2 -- x11/x11.cu | 1 - x13/x13.cu | 2 -- x15/whirlpoolx.cu | 2 -- x15/x14.cu | 4 ---- x15/x15.cu | 3 --- 14 files changed, 33 deletions(-) diff --git a/Algo256/blake256.cu b/Algo256/blake256.cu index e16c3b33..dd431242 100644 --- a/Algo256/blake256.cu +++ b/Algo256/blake256.cu @@ -479,7 +479,6 @@ extern int scanhash_blake256(int thr_id, uint32_t *pdata, uint32_t *ptarget, #endif //applog_hash((uint8_t*)ptarget); //applog_compare_hash((uint8_t*)vhashcpu,(uint8_t*)ptarget); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return rc; } else if (opt_debug) { @@ -494,6 +493,5 @@ extern int scanhash_blake256(int thr_id, uint32_t *pdata, uint32_t *ptarget, *hashes_done = pdata[19] - first_nonce; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return rc; } diff --git a/cuda_nist5.cu b/cuda_nist5.cu index 38fc9df5..a2a82323 100644 --- a/cuda_nist5.cu +++ b/cuda_nist5.cu @@ -177,7 +177,6 @@ extern int scanhash_nist5(int thr_id, uint32_t *pdata, pdata[19] = h_found[thr_id][0]; if (opt_benchmark) applog(LOG_INFO, "GPU #%d Found nounce %08x", device_map[thr_id], h_found[thr_id][0]); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -192,6 +191,5 @@ extern int scanhash_nist5(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/lyra2/lyra2RE.cu b/lyra2/lyra2RE.cu index 0c09644a..a40111a4 100644 --- a/lyra2/lyra2RE.cu +++ b/lyra2/lyra2RE.cu @@ -111,7 +111,6 @@ extern int scanhash_lyra2(int thr_id, uint32_t *pdata, keccak256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id]); lyra2_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id]); skein256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id]); - //MyStreamSynchronize(NULL, 2, thr_id); groestl256_cpu_hash_32(thr_id, throughput, pdata[19], d_hash[thr_id], foundNonce); if (foundNonce[0] != 0) { @@ -145,7 +144,6 @@ extern int scanhash_lyra2(int thr_id, uint32_t *pdata, } pdata[19] = foundNonce[0]; if (opt_benchmark) applog(LOG_INFO, "GPU #%d: Found nounce %08x", device_map[thr_id], foundNonce[0]); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -159,6 +157,5 @@ extern int scanhash_lyra2(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/pentablake.cu b/pentablake.cu index 50611098..2a2d81e1 100644 --- a/pentablake.cu +++ b/pentablake.cu @@ -317,8 +317,6 @@ void pentablake_cpu_hash_80(int thr_id, uint32_t threads, const uint32_t startNo dim3 block(TPB); pentablake_gpu_hash_80 <<>> (threads, startNounce, d_outputHash); - - //MyStreamSynchronize(NULL, thr_id); } @@ -372,8 +370,6 @@ void pentablake_cpu_hash_64(int thr_id, uint32_t threads, uint32_t startNounce, dim3 block(TPB); pentablake_gpu_hash_64 <<>> (threads, startNounce, (uint64_t*)d_outputHash); - - //MyStreamSynchronize(NULL, thr_id); } #if 0 @@ -530,7 +526,6 @@ extern int scanhash_pentablake(int thr_id, uint32_t *pdata, uint32_t *ptarget, rc++; } pdata[19] = foundNonce; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return rc; } else if (vhashcpu[7] > Htarg) { @@ -545,6 +540,5 @@ extern int scanhash_pentablake(int thr_id, uint32_t *pdata, uint32_t *ptarget, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return rc; } diff --git a/qubit/deep.cu b/qubit/deep.cu index eaf02bb8..a3d41859 100644 --- a/qubit/deep.cu +++ b/qubit/deep.cu @@ -155,6 +155,5 @@ extern int scanhash_deep(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/qubit/doom.cu b/qubit/doom.cu index 6bf49de8..fd154e15 100644 --- a/qubit/doom.cu +++ b/qubit/doom.cu @@ -96,10 +96,8 @@ extern int scanhash_doom(int thr_id, uint32_t *pdata, } pdata[19] += throughput; CUDA_SAFE_CALL(cudaGetLastError()); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/qubit/qubit.cu b/qubit/qubit.cu index 545cffdc..1e1b41a4 100644 --- a/qubit/qubit.cu +++ b/qubit/qubit.cu @@ -189,7 +189,6 @@ extern int scanhash_qubit(int thr_id, uint32_t *pdata, pdata[19] = h_found[thr_id][0]; if (opt_benchmark) applog(LOG_INFO, "GPU #%d Found nounce %08x", device_map[thr_id], h_found[thr_id][0]); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -204,6 +203,5 @@ extern int scanhash_qubit(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x11/fresh.cu b/x11/fresh.cu index 00674763..ffac1987 100644 --- a/x11/fresh.cu +++ b/x11/fresh.cu @@ -175,6 +175,5 @@ extern int scanhash_fresh(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x11/s3.cu b/x11/s3.cu index 7038c148..a89e108f 100644 --- a/x11/s3.cu +++ b/x11/s3.cu @@ -150,7 +150,6 @@ extern int scanhash_s3(int thr_id, uint32_t *pdata, pdata[19] = h_found[thr_id][0]; if (opt_benchmark) applog(LOG_INFO, "GPU #%d Found nounce %08x", device_map[thr_id], h_found[thr_id][0]); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -165,6 +164,5 @@ extern int scanhash_s3(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x11/x11.cu b/x11/x11.cu index 3b8817c9..fcd5bd78 100644 --- a/x11/x11.cu +++ b/x11/x11.cu @@ -259,6 +259,5 @@ extern int scanhash_x11(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x13/x13.cu b/x13/x13.cu index 26579cb8..7be62381 100644 --- a/x13/x13.cu +++ b/x13/x13.cu @@ -271,7 +271,6 @@ extern int scanhash_x13(int thr_id, uint32_t *pdata, pdata[19] = h_found[thr_id][0]; if (opt_benchmark) applog(LOG_INFO, "GPU #%d Found nounce %08x", device_map[thr_id], h_found[thr_id][0]); - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -286,6 +285,5 @@ extern int scanhash_x13(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x15/whirlpoolx.cu b/x15/whirlpoolx.cu index 153313bc..087f17c6 100644 --- a/x15/whirlpoolx.cu +++ b/x15/whirlpoolx.cu @@ -110,7 +110,6 @@ int scanhash_whirlpoolx(int thr_id, uint32_t *pdata, uint32_t *ptarget, uint32_t if (opt_benchmark) applog(LOG_INFO, "GPU #%d: found nonce %08x", device_map[thr_id], foundNonce[0], vhash64[7]); pdata[19] = foundNonce[0]; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -122,6 +121,5 @@ int scanhash_whirlpoolx(int thr_id, uint32_t *pdata, uint32_t *ptarget, uint32_t pdata[19] += throughput; } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x15/x14.cu b/x15/x14.cu index d486c73b..9fbed267 100644 --- a/x15/x14.cu +++ b/x15/x14.cu @@ -235,8 +235,6 @@ extern int scanhash_x14(int thr_id, uint32_t *pdata, x13_fugue512_cpu_hash_64(thr_id, throughput, pdata[19], d_hash[thr_id]); x14_shabal512_cpu_hash_64(thr_id, throughput, pdata[19], d_hash[thr_id]); - // MyStreamSynchronize(NULL, 1, thr_id); - uint32_t foundNonce = cuda_check_hash(thr_id, throughput, pdata[19], d_hash[thr_id]); if (foundNonce != UINT32_MAX) { @@ -266,7 +264,6 @@ extern int scanhash_x14(int thr_id, uint32_t *pdata, } } pdata[19] = foundNonce; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -278,6 +275,5 @@ extern int scanhash_x14(int thr_id, uint32_t *pdata, } while (!work_restart[thr_id].restart && ((uint64_t)max_nonce > ((uint64_t)(pdata[19]) + (uint64_t)throughput))); *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; } diff --git a/x15/x15.cu b/x15/x15.cu index 52494789..967ca92a 100644 --- a/x15/x15.cu +++ b/x15/x15.cu @@ -249,7 +249,6 @@ extern int scanhash_x15(int thr_id, uint32_t *pdata, x13_fugue512_cpu_hash_64(thr_id, throughput, pdata[19], d_hash[thr_id]); x14_shabal512_cpu_hash_64(thr_id, throughput, pdata[19], d_hash[thr_id]); x15_whirlpool_cpu_hash_64(thr_id, throughput, pdata[19], d_hash[thr_id]); -// MyStreamSynchronize(NULL, 1, thr_id); uint32_t foundNonce = cuda_check_hash(thr_id, throughput, pdata[19], d_hash[thr_id]); if (foundNonce != UINT32_MAX) @@ -283,7 +282,6 @@ extern int scanhash_x15(int thr_id, uint32_t *pdata, if (opt_benchmark) applog(LOG_INFO, "GPU #%d: found nounce %08x", device_map[thr_id], foundNonce); pdata[19] = foundNonce; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return res; } else @@ -297,6 +295,5 @@ extern int scanhash_x15(int thr_id, uint32_t *pdata, *hashes_done = pdata[19] - first_nonce + 1; - MyStreamSynchronize(NULL, NULL, device_map[thr_id]); return 0; }