Skip to content

Commit

Permalink
Merge pull request #12 from fancyIX/feature/#11_2
Browse files Browse the repository at this point in the history
Issue #11
  • Loading branch information
fancyIX authored Feb 19, 2022
2 parents 8a07954 + a2b2693 commit 95982fa
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ endif
ccminer_LDADD += -lcuda

nvcc_ARCH :=
#nvcc_ARCH += -gencode=arch=compute_86,code=\"sm_86,compute_86\"
nvcc_ARCH += -gencode=arch=compute_86,code=\"sm_86,compute_86\"
nvcc_ARCH += -gencode=arch=compute_75,code=\"sm_75,compute_75\"
nvcc_ARCH += -gencode=arch=compute_61,code=\"sm_61,compute_61\"
nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
#nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
#nvcc_ARCH += -gencode=arch=compute_50,code=\"sm_50,compute_50\"
#nvcc_ARCH += -gencode=arch=compute_35,code=\"sm_35,compute_35\"
#nvcc_ARCH += -gencode=arch=compute_30,code=\"sm_30,compute_30\"
Expand Down
15 changes: 8 additions & 7 deletions allium.cu
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ extern void skein256_cpu_init(int thr_id, uint32_t threads);

extern void lyra2_cpu_init(int thr_id, uint32_t threads, uint64_t *d_matrix);
extern void lyra2_cpu_init_high_end(int thr_id, uint32_t threads, uint64_t *g_pad);
extern void lyra2_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNonce, uint64_t *d_outputHash, bool gtx750ti, bool high_end);
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);
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);
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);

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

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

if (strstr(props.name, "1080") ||
strstr(props.name, "1070") ||
strstr(props.name, "1070")) high_end = 1;
if (strstr(props.name, "3090") ||
strstr(props.name, "3080") ||
strstr(props.name, "3070") ||
strstr(props.name, "3060")) high_end = true;
else high_end = false;
strstr(props.name, "3060")) high_end = 2;
else high_end = 0;

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

Expand All @@ -130,7 +131,7 @@ extern "C" int scanhash_allium(int thr_id, struct work* work, uint32_t max_nonce
size_t matrix_sz = device_sm[dev_id] > 500 ? sizeof(uint64_t) * 4 * 4 : sizeof(uint64_t) * 8 * 8 * 3 * 4;
CUDA_SAFE_CALL(cudaMalloc(&d_matrix[thr_id], matrix_sz * throughput));
lyra2_cpu_init(thr_id, throughput, d_matrix[thr_id]);
if (high_end) {
if (high_end == 1) {
size_t pad_sz = sizeof(uint64_t) * 8 * 8 * 3 * 4;
CUDA_SAFE_CALL(cudaMalloc(&g_pad[thr_id], pad_sz * throughput));
lyra2_cpu_init_high_end(thr_id, throughput, g_pad[thr_id]);
Expand Down
2 changes: 1 addition & 1 deletion ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<MaxRegCount>128</MaxRegCount>
<PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep>
<CodeGeneration>compute_75,sm_75;compute_61,sm_61;compute_52,sm_52</CodeGeneration>
<CodeGeneration>compute_86,sm_86;compute_75,sm_75;compute_61,sm_61</CodeGeneration>
<Include>$(NVTOOLSEXT_PATH)\include</Include>
<Optimization>O3</Optimization>
<TargetMachinePlatform>64</TargetMachinePlatform>
Expand Down
Loading

0 comments on commit 95982fa

Please sign in to comment.