mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-22 04:24:29 +00:00
attempt to reduce shared mem errors
This commit is contained in:
parent
8985f7ee91
commit
0a0fd33cac
@ -1,4 +1,4 @@
|
|||||||
AC_INIT([ccminer], [1.8], [], [ccminer], [http://github.com/tpruvot/ccminer])
|
AC_INIT([ccminer], [1.8.1], [], [ccminer], [http://github.com/tpruvot/ccminer])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
@ -111,7 +111,7 @@ extern "C" int scanhash_c11(int thr_id, struct work* work, uint32_t max_nonce, u
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
((uint32_t*)ptarget)[7] = 0x5;
|
((uint32_t*)ptarget)[7] = 0x5;
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "cuda_helper.h"
|
#include "cuda_helper.h"
|
||||||
|
|
||||||
|
extern __device__ __device_builtin__ void __threadfence_block(void);
|
||||||
|
|
||||||
#include "cuda_x11_aes.cuh"
|
#include "cuda_x11_aes.cuh"
|
||||||
|
|
||||||
__device__ __forceinline__ void AES_2ROUND(
|
__device__ __forceinline__ void AES_2ROUND(
|
||||||
@ -284,6 +286,7 @@ void x11_echo512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t *g
|
|||||||
__shared__ uint32_t sharedMemory[1024];
|
__shared__ uint32_t sharedMemory[1024];
|
||||||
|
|
||||||
echo_gpu_init(sharedMemory);
|
echo_gpu_init(sharedMemory);
|
||||||
|
__threadfence_block();
|
||||||
|
|
||||||
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
||||||
if (thread < threads)
|
if (thread < threads)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "cuda_helper.h"
|
#include "cuda_helper.h"
|
||||||
|
|
||||||
|
extern __device__ __device_builtin__ void __threadfence_block(void);
|
||||||
|
|
||||||
#define TPB 128
|
#define TPB 128
|
||||||
|
|
||||||
__constant__ uint32_t c_PaddedMessage80[32]; // padded message (80 bytes + padding)
|
__constant__ uint32_t c_PaddedMessage80[32]; // padded message (80 bytes + padding)
|
||||||
@ -1346,6 +1348,7 @@ void x11_shavite512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t
|
|||||||
__shared__ uint32_t sharedMemory[1024];
|
__shared__ uint32_t sharedMemory[1024];
|
||||||
|
|
||||||
shavite_gpu_init(sharedMemory);
|
shavite_gpu_init(sharedMemory);
|
||||||
|
__threadfence_block();
|
||||||
|
|
||||||
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
||||||
if (thread < threads)
|
if (thread < threads)
|
||||||
@ -1397,6 +1400,7 @@ void x11_shavite512_gpu_hash_80(uint32_t threads, uint32_t startNounce, void *ou
|
|||||||
__shared__ uint32_t sharedMemory[1024];
|
__shared__ uint32_t sharedMemory[1024];
|
||||||
|
|
||||||
shavite_gpu_init(sharedMemory);
|
shavite_gpu_init(sharedMemory);
|
||||||
|
__threadfence_block();
|
||||||
|
|
||||||
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
|
||||||
if (thread < threads)
|
if (thread < threads)
|
||||||
|
@ -72,7 +72,7 @@ extern "C" int scanhash_s3(int thr_id, struct work* work, uint32_t max_nonce, un
|
|||||||
intensity--;
|
intensity--;
|
||||||
#endif
|
#endif
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity);
|
uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity);
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
ptarget[7] = 0xF;
|
ptarget[7] = 0xF;
|
||||||
|
@ -106,7 +106,7 @@ extern "C" int scanhash_sib(int thr_id, struct work* work, uint32_t max_nonce, u
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 19 : 18;
|
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 19 : 18;
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
ptarget[7] = 0xf;
|
ptarget[7] = 0xf;
|
||||||
|
@ -100,7 +100,7 @@ extern "C" int scanhash_x11(int thr_id, struct work* work, uint32_t max_nonce, u
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
ptarget[7] = 0x5;
|
ptarget[7] = 0x5;
|
||||||
|
@ -232,7 +232,7 @@ extern "C" int scanhash_x11evo(int thr_id, struct work* work, uint32_t max_nonce
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << intensity); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_debug || s_ntime != pdata[17] || s_sequence == -1) {
|
if (opt_debug || s_ntime != pdata[17] || s_sequence == -1) {
|
||||||
uint32_t ntime = swab32(work->data[17]);
|
uint32_t ntime = swab32(work->data[17]);
|
||||||
|
@ -119,7 +119,7 @@ extern "C" int scanhash_x13(int thr_id, struct work* work, uint32_t max_nonce, u
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
int intensity = 19; // (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19;
|
int intensity = 19; // (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19;
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
((uint32_t*)ptarget)[7] = 0x000f;
|
((uint32_t*)ptarget)[7] = 0x000f;
|
||||||
|
@ -133,7 +133,7 @@ extern "C" int scanhash_x14(int thr_id, struct work* work, uint32_t max_nonce,
|
|||||||
uint32_t endiandata[20];
|
uint32_t endiandata[20];
|
||||||
|
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
ptarget[7] = 0x000f;
|
ptarget[7] = 0x000f;
|
||||||
|
@ -143,7 +143,7 @@ extern "C" int scanhash_x15(int thr_id, struct work* work, uint32_t max_nonce,
|
|||||||
uint32_t endiandata[20];
|
uint32_t endiandata[20];
|
||||||
|
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
ptarget[7] = 0x00FF;
|
ptarget[7] = 0x00FF;
|
||||||
|
@ -159,7 +159,7 @@ extern "C" int scanhash_x17(int thr_id, struct work* work, uint32_t max_nonce, u
|
|||||||
const uint32_t first_nonce = pdata[19];
|
const uint32_t first_nonce = pdata[19];
|
||||||
|
|
||||||
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
uint32_t throughput = cuda_default_throughput(thr_id, 1U << 19); // 19=256*256*8;
|
||||||
if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);
|
||||||
|
|
||||||
if (opt_benchmark)
|
if (opt_benchmark)
|
||||||
((uint32_t*)ptarget)[7] = 0x00ff;
|
((uint32_t*)ptarget)[7] = 0x00ff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user