Skip to content

Commit

Permalink
x16r algo and new kernels
Browse files Browse the repository at this point in the history
Was a very long work but finally working,
and unlike xevan these new kernels are reusable..

Signed-off-by: Tanguy Pruvot <[email protected]>
  • Loading branch information
tpruvot authored and stef2 committed Mar 21, 2018
1 parent 01b0af3 commit 1ce6804
Show file tree
Hide file tree
Showing 20 changed files with 4,047 additions and 446 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ ccminer_SOURCES = elist.h miner.h compat.h \
x13/hsr.cu x13/cuda_hsr_sm3.cu x13/sm3.c \
x15/x14.cu x15/x15.cu x15/cuda_x14_shabal512.cu x15/cuda_x15_whirlpool.cu \
x15/whirlpool.cu x15/cuda_x15_whirlpool_sm3.cu \
x16r/x16r.cu x16r/cuda_x16_echo512.cu x16r/cuda_x16_fugue512.cu \
x16r/cuda_x16_shabal512.cu x16r/cuda_x16_simd512_80.cu \
x17/x17.cu x17/hmq17.cu x17/cuda_x17_haval256.cu x17/cuda_x17_sha512.cu \
x11/phi.cu x11/cuda_streebog_maxwell.cu \
x11/c11.cu x11/s3.cu x11/sib.cu x11/veltor.cu x11/cuda_streebog.cu
Expand Down
6 changes: 5 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

ccminer 2.2.4 (Jan. 2018) "lyra2v2 and keccak improvements"
ccminer 2.2.5 (Feb 2018) "x16r algo"
---------------------------------------------------------------

***************************************************************
Expand Down Expand Up @@ -122,6 +122,7 @@ its command line interface and options.
x11 use to mine DarkCoin
x14 use to mine X14Coin
x15 use to mine Halcyon
x16r use to mine Raven
x17 use to mine X17
vanilla use to mine Vanilla (Blake256)
veltor use to mine VeltorCoin
Expand Down Expand Up @@ -277,6 +278,9 @@ so we can more efficiently implement new algorithms using the latest hardware
features.

>>> RELEASE HISTORY <<<
Feb. 2017 v2.2.5
New x16r algo

Jan. 04th 2017 v2.2.4
Improve lyra2v2
Higher keccak default intensity
Expand Down
2 changes: 2 additions & 0 deletions algos.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum sha_algos {
ALGO_X13,
ALGO_X14,
ALGO_X15,
ALGO_X16R,
ALGO_X17,
ALGO_VANILLA,
ALGO_VELTOR,
Expand Down Expand Up @@ -128,6 +129,7 @@ static const char *algo_names[] = {
"x13",
"x14",
"x15",
"x16r",
"x17",
"vanilla",
"veltor",
Expand Down
1 change: 1 addition & 0 deletions bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ void algo_free_all(int thr_id)
free_x13(thr_id);
free_x14(thr_id);
free_x15(thr_id);
free_x16r(thr_id);
free_x17(thr_id);
free_zr5(thr_id);
free_scrypt(thr_id);
Expand Down
5 changes: 5 additions & 0 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ Options:\n\
x13 X13 (MaruCoin)\n\
x14 X14\n\
x15 X15\n\
x16r X16R (Raven)\n\
x17 X17\n\
wildkeccak Boolberry\n\
zr5 ZR5 (ZiftrCoin)\n\
Expand Down Expand Up @@ -1705,6 +1706,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
case ALGO_LYRA2Z:
case ALGO_TIMETRAVEL:
case ALGO_BITCORE:
case ALGO_X16R:
work_set_target(work, sctx->job.diff / (256.0 * opt_difficulty));
break;
case ALGO_KECCAK:
Expand Down Expand Up @@ -2499,6 +2501,9 @@ static void *miner_thread(void *userdata)
case ALGO_X15:
rc = scanhash_x15(thr_id, &work, max_nonce, &hashes_done);
break;
case ALGO_X16R:
rc = scanhash_x16r(thr_id, &work, max_nonce, &hashes_done);
break;
case ALGO_X17:
rc = scanhash_x17(thr_id, &work, max_nonce, &hashes_done);
break;
Expand Down
12 changes: 9 additions & 3 deletions ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
<ClCompile Include="neoscrypt\neoscrypt-cpu.c" />
<ClInclude Include="neoscrypt\cuda_vectors.h" />
<ClInclude Include="x11\cuda_x11_simd512_sm2.cuh" />
<ClInclude Include="x16r\cuda_x16r.h" />
<CudaCompile Include="Algo256\bmw.cu" />
<CudaCompile Include="Algo256\cuda_bmw.cu">
<MaxRegCount>76</MaxRegCount>
Expand Down Expand Up @@ -434,6 +435,12 @@
<CudaCompile Include="sha256\sha256d.cu" />
<CudaCompile Include="sha256\cuda_sha256t.cu" />
<CudaCompile Include="sha256\sha256t.cu" />
<CudaCompile Include="x15\cuda_x15_whirlpool_sm3.cu" />
<CudaCompile Include="x16r\x16r.cu" />
<CudaCompile Include="x16r\cuda_x16_echo512.cu" />
<CudaCompile Include="x16r\cuda_x16_fugue512.cu" />
<CudaCompile Include="x16r\cuda_x16_shabal512.cu" />
<CudaCompile Include="x16r\cuda_x16_simd512_80.cu" />
<CudaCompile Include="zr5.cu" />
<CudaCompile Include="heavy\cuda_blake512.cu">
</CudaCompile>
Expand Down Expand Up @@ -587,8 +594,7 @@
<CudaCompile Include="x17\hmq17.cu" />
<CudaCompile Include="x15\x15.cu" />
<CudaCompile Include="x15\whirlpool.cu" />
<CudaCompile Include="x17\x17.cu">
</CudaCompile>
<CudaCompile Include="x17\x17.cu" />
<CudaCompile Include="x17\cuda_x17_haval256.cu">
</CudaCompile>
<CudaCompile Include="x17\cuda_x17_sha512.cu">
Expand All @@ -615,4 +621,4 @@
<Target Name="AfterClean">
<Delete Files="@(FilesToCopy->'$(OutDir)%(Filename)%(Extension)')" TreatErrorsAsWarnings="true" />
</Target>
</Project>
</Project>
26 changes: 25 additions & 1 deletion ccminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<Filter Include="Source Files\CUDA\x15">
<UniqueIdentifier>{a2403c22-6777-46ab-a55a-3fcc7386c974}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CUDA\x16r">
<UniqueIdentifier>{55dfae6a-66ba-43e2-8ceb-98ee70cbdf16}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CUDA\x17">
<UniqueIdentifier>{85dfae6a-66ca-4332-8cec-98ee70cbdf2f}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -596,6 +599,9 @@
<ClInclude Include="equi\equihash.h">
<Filter>Source Files\equi</Filter>
</ClInclude>
<ClInclude Include="x16r\cuda_x16r.h">
<Filter>Header Files\CUDA</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CudaCompile Include="cuda.cpp">
Expand Down Expand Up @@ -967,6 +973,24 @@
<CudaCompile Include="equi\cuda_equi.cu">
<Filter>Source Files\equi</Filter>
</CudaCompile>
<CudaCompile Include="x15\cuda_x15_whirlpool_sm3.cu">
<Filter>Source Files\CUDA\x15</Filter>
</CudaCompile>
<CudaCompile Include="x16r\cuda_x16_echo512.cu">
<Filter>Source Files\CUDA\x16r</Filter>
</CudaCompile>
<CudaCompile Include="x16r\cuda_x16_fugue512.cu">
<Filter>Source Files\CUDA\x16r</Filter>
</CudaCompile>
<CudaCompile Include="x16r\cuda_x16_shabal512.cu">
<Filter>Source Files\CUDA\x16r</Filter>
</CudaCompile>
<CudaCompile Include="x16r\cuda_x16_simd512_80.cu">
<Filter>Source Files\CUDA\x16r</Filter>
</CudaCompile>
<CudaCompile Include="x16r\x16r.cu">
<Filter>Source Files\CUDA\x16r</Filter>
</CudaCompile>
</ItemGroup>
<ItemGroup>
<Image Include="res\ccminer.ico">
Expand All @@ -983,4 +1007,4 @@
<Filter>Ressources</Filter>
</Text>
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion compat/ccminer-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
#define PACKAGE_URL "http://github.com/tpruvot/ccminer"

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.2.4"
#define PACKAGE_VERSION "2.2.5"

/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
Expand Down
3 changes: 3 additions & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ extern int scanhash_x11(int thr_id, struct work* work, uint32_t max_nonce, unsig
extern int scanhash_x13(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_x14(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_x15(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_x16r(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_x17(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_zr5(int thr_id, struct work *work, uint32_t max_nonce, unsigned long *hashes_done);

Expand Down Expand Up @@ -389,6 +390,7 @@ extern void free_x11(int thr_id);
extern void free_x13(int thr_id);
extern void free_x14(int thr_id);
extern void free_x15(int thr_id);
extern void free_x16r(int thr_id);
extern void free_x17(int thr_id);
extern void free_zr5(int thr_id);
//extern void free_sha256d(int thr_id);
Expand Down Expand Up @@ -933,6 +935,7 @@ void x11hash(void *output, const void *input);
void x13hash(void *output, const void *input);
void x14hash(void *output, const void *input);
void x15hash(void *output, const void *input);
void x16r_hash(void *output, const void *input);
void x17hash(void *output, const void *input);
void wildkeccak_hash(void *output, const void *input, uint64_t* scratchpad, uint64_t ssize);
void zr5hash(void *output, const void *input);
Expand Down
8 changes: 4 additions & 4 deletions res/ccminer.rc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ IDI_ICON1 ICON "ccminer.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,2,4,0
PRODUCTVERSION 2,2,4,0
FILEVERSION 2,2,5,0
PRODUCTVERSION 2,2,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
Expand All @@ -76,10 +76,10 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "FileVersion", "2.2.4"
VALUE "FileVersion", "2.2.5"
VALUE "LegalCopyright", "Copyright (C) 2018"
VALUE "ProductName", "ccminer"
VALUE "ProductVersion", "2.2.4"
VALUE "ProductVersion", "2.2.5"
END
END
BLOCK "VarFileInfo"
Expand Down
3 changes: 3 additions & 0 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2325,6 +2325,9 @@ void print_hash_tests(void)
x15hash(&hash[0], &buf[0]);
printpfx("X15", hash);

x16r_hash(&hash[0], &buf[0]);
printpfx("X16r", hash);

x17hash(&hash[0], &buf[0]);
printpfx("X17", hash);

Expand Down
Loading

0 comments on commit 1ce6804

Please sign in to comment.