Skip to content

Commit a2b2693

Browse files
fancyIXfancyIX
fancyIX
authored and
fancyIX
committed
Issue #11
Seems working
1 parent 8a07954 commit a2b2693

File tree

5 files changed

+372
-15
lines changed

5 files changed

+372
-15
lines changed

Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ endif
116116
ccminer_LDADD += -lcuda
117117

118118
nvcc_ARCH :=
119-
#nvcc_ARCH += -gencode=arch=compute_86,code=\"sm_86,compute_86\"
119+
nvcc_ARCH += -gencode=arch=compute_86,code=\"sm_86,compute_86\"
120120
nvcc_ARCH += -gencode=arch=compute_75,code=\"sm_75,compute_75\"
121121
nvcc_ARCH += -gencode=arch=compute_61,code=\"sm_61,compute_61\"
122-
nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
122+
#nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
123123
#nvcc_ARCH += -gencode=arch=compute_50,code=\"sm_50,compute_50\"
124124
#nvcc_ARCH += -gencode=arch=compute_35,code=\"sm_35,compute_35\"
125125
#nvcc_ARCH += -gencode=arch=compute_30,code=\"sm_30,compute_30\"

allium.cu

+8-7
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ extern void skein256_cpu_init(int thr_id, uint32_t threads);
2929

3030
extern void lyra2_cpu_init(int thr_id, uint32_t threads, uint64_t *d_matrix);
3131
extern void lyra2_cpu_init_high_end(int thr_id, uint32_t threads, uint64_t *g_pad);
32-
extern void lyra2_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNonce, uint64_t *d_outputHash, bool gtx750ti, bool high_end);
33-
extern void lyra2_cpu_hash_32_fancyIX(int thr_id, uint32_t threads, uint32_t startNounce, uint64_t *d_hash, uint64_t *g_pad, bool gtx750ti, bool high_end);
32+
extern void lyra2_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNonce, uint64_t *d_outputHash, bool gtx750ti, uint32_t high_end);
33+
extern void lyra2_cpu_hash_32_fancyIX(int thr_id, uint32_t threads, uint32_t startNounce, uint64_t *d_hash, uint64_t *g_pad, bool gtx750ti, uint32_t high_end);
3434

3535
extern void groestl256_cpu_init(int thr_id, uint32_t threads);
3636
extern void groestl256_cpu_free(int thr_id);
@@ -92,7 +92,7 @@ extern "C" int scanhash_allium(int thr_id, struct work* work, uint32_t max_nonce
9292
ptarget[7] = 0x0400;
9393

9494
static __thread bool gtx750ti;
95-
static __thread bool high_end;
95+
static __thread uint32_t high_end;
9696
if (!init[thr_id])
9797
{
9898
int dev_id = device_map[thr_id];
@@ -111,11 +111,12 @@ extern "C" int scanhash_allium(int thr_id, struct work* work, uint32_t max_nonce
111111
else gtx750ti = false;
112112

113113
if (strstr(props.name, "1080") ||
114-
strstr(props.name, "1070") ||
114+
strstr(props.name, "1070")) high_end = 1;
115+
if (strstr(props.name, "3090") ||
115116
strstr(props.name, "3080") ||
116117
strstr(props.name, "3070") ||
117-
strstr(props.name, "3060")) high_end = true;
118-
else high_end = false;
118+
strstr(props.name, "3060")) high_end = 2;
119+
else high_end = 0;
119120

120121
gpulog(LOG_INFO, thr_id, "Intensity set to %g, %u cuda threads", throughput2intensity(throughput), throughput);
121122

@@ -130,7 +131,7 @@ extern "C" int scanhash_allium(int thr_id, struct work* work, uint32_t max_nonce
130131
size_t matrix_sz = device_sm[dev_id] > 500 ? sizeof(uint64_t) * 4 * 4 : sizeof(uint64_t) * 8 * 8 * 3 * 4;
131132
CUDA_SAFE_CALL(cudaMalloc(&d_matrix[thr_id], matrix_sz * throughput));
132133
lyra2_cpu_init(thr_id, throughput, d_matrix[thr_id]);
133-
if (high_end) {
134+
if (high_end == 1) {
134135
size_t pad_sz = sizeof(uint64_t) * 8 * 8 * 3 * 4;
135136
CUDA_SAFE_CALL(cudaMalloc(&g_pad[thr_id], pad_sz * throughput));
136137
lyra2_cpu_init_high_end(thr_id, throughput, g_pad[thr_id]);

ccminer.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
<MaxRegCount>128</MaxRegCount>
199199
<PtxAsOptionV>true</PtxAsOptionV>
200200
<Keep>true</Keep>
201-
<CodeGeneration>compute_75,sm_75;compute_61,sm_61;compute_52,sm_52</CodeGeneration>
201+
<CodeGeneration>compute_86,sm_86;compute_75,sm_75;compute_61,sm_61</CodeGeneration>
202202
<Include>$(NVTOOLSEXT_PATH)\include</Include>
203203
<Optimization>O3</Optimization>
204204
<TargetMachinePlatform>64</TargetMachinePlatform>

0 commit comments

Comments
 (0)