Skip to content

Commit

Permalink
Add "rx/yada" algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
pdxwebdev authored and Spudz76 committed Nov 26, 2021
1 parent 8e6f3ad commit dabd7d8
Show file tree
Hide file tree
Showing 20 changed files with 3,848 additions and 3,650 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# v6.16.0
- [#2411](https://github.com/xmrig/xmrig/pull/2411) Added support for Yada (`rx/yada` algorithm).
- [#2712](https://github.com/xmrig/xmrig/pull/2712) **GhostRider algorithm (Raptoreum) support**: read the [RELEASE NOTES](src/crypto/ghostrider/README.md) for quick start guide and performance comparisons.

# v6.15.3
Expand Down
1 change: 1 addition & 0 deletions doc/ALGORITHMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Option `coin` useful for pools without [algorithm negotiation](https://xmrig.com

| Name | Memory | Version | Description | Notes |
|------|--------|---------|-------------|-------|
| `rx/yada` | 1 MB | 6.16.0+ | RandomYADA (RandomX variant for Yada). | |
| `kawpow` | - | 6.0.0+ | KawPow (Ravencoin) | GPU only |
| `rx/keva` | 1 MB | 5.9.0+ | RandomKEVA (RandomX variant for Keva). | |
| `astrobwt` | 20 MB | 5.8.0+ | AstroBWT (Dero). | |
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_cl.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function rx()
'randomx_constants_arqma.h',
'randomx_constants_keva.h',
'randomx_constants_graft.h',
'randomx_constants_yada.h',
'aes.cl',
'blake2b.cl',
'randomx_vm.cl',
Expand Down
5 changes: 5 additions & 0 deletions src/backend/cpu/CpuConfig_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CpuThreads> &threads, uint32
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
}

if (!threads.isExist(Algorithm::RX_YADA)) {
auto yada = cpuInfo->threads(Algorithm::RX_YADA, limit);
count += threads.move(Algorithm::kRX_YADA, std::move(yada));
}

count += generate(Algorithm::kRX, threads, Algorithm::RX_0, limit);

return count;
Expand Down
5 changes: 5 additions & 0 deletions src/backend/cuda/CudaConfig_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
auto wow = CudaThreads(devices, Algorithm::RX_WOW);
auto arq = CudaThreads(devices, Algorithm::RX_ARQ);
auto kva = CudaThreads(devices, Algorithm::RX_KEVA);
auto yda = CudaThreads(devices, Algorithm::RX_YADA);

if (!threads.isExist(Algorithm::RX_WOW) && wow != rx) {
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
Expand All @@ -128,6 +129,10 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
count += threads.move(Algorithm::kRX_KEVA, std::move(kva));
}

if (!threads.isExist(Algorithm::RX_YADA) && yda != rx) {
count += threads.move(Algorithm::kRX_YADA, std::move(yda));
}

count += threads.move(Algorithm::kRX, std::move(rx));

return count;
Expand Down
5 changes: 5 additions & 0 deletions src/backend/opencl/OclConfig_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<OclThreads> &threads, const
auto rx = OclThreads(devices, Algorithm::RX_0);
auto wow = OclThreads(devices, Algorithm::RX_WOW);
auto arq = OclThreads(devices, Algorithm::RX_ARQ);
auto yda = OclThreads(devices, Algorithm::RX_YADA);

if (!threads.isExist(Algorithm::RX_WOW) && wow != rx) {
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
Expand All @@ -122,6 +123,10 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<OclThreads> &threads, const
count += threads.move(Algorithm::kRX_ARQ, std::move(arq));
}

if (!threads.isExist(Algorithm::RX_YADA) && yda != rx) {
count += threads.move(Algorithm::kRX_YADA, std::move(yda));
}

count += threads.move(Algorithm::kRX, std::move(rx));

return count;
Expand Down
1 change: 1 addition & 0 deletions src/backend/opencl/cl/cn/algorithm.cl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define ALGO_RX_SFX 0x72151273
#define ALGO_RX_KEVA 0x7214116b
#define ALGO_RX_GRAFT 0x72151267
#define ALGO_RX_YADA 0x72151279
#define ALGO_AR2_CHUKWA 0x61130000
#define ALGO_AR2_CHUKWA_V2 0x61140000
#define ALGO_AR2_WRKZ 0x61120000
Expand Down
5 changes: 3 additions & 2 deletions src/backend/opencl/cl/cn/cryptonight_cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace xmrig {

static const char cryptonight_cl[61520] = {
static const char cryptonight_cl[61552] = {
0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x53,0x54,0x41,0x54,0x49,0x43,0x0a,0x23,0x75,0x6e,0x64,0x65,0x66,0x20,0x53,0x54,0x41,0x54,0x49,0x43,0x0a,0x23,0x65,0x6e,0x64,
0x69,0x66,0x0a,0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x63,0x6c,0x5f,0x61,0x6d,0x64,0x5f,0x6d,0x65,0x64,0x69,0x61,0x5f,0x6f,0x70,0x73,0x0a,0x23,0x64,0x65,0x66,0x69,
0x6e,0x65,0x20,0x53,0x54,0x41,0x54,0x49,0x43,0x20,0x73,0x74,0x61,0x74,0x69,0x63,0x0a,0x23,0x65,0x6c,0x73,0x65,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x53,
Expand Down Expand Up @@ -36,7 +36,8 @@ static const char cryptonight_cl[61520] = {
0x31,0x32,0x31,0x30,0x36,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,
0x35,0x31,0x32,0x37,0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x4b,0x45,0x56,0x41,0x20,0x30,0x78,0x37,0x32,0x31,
0x34,0x31,0x31,0x36,0x62,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,
0x31,0x35,0x31,0x32,0x36,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,
0x31,0x35,0x31,0x32,0x36,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,
0x31,0x35,0x31,0x32,0x37,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,
0x78,0x36,0x31,0x31,0x33,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,
0x41,0x5f,0x56,0x32,0x20,0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,
0x5f,0x57,0x52,0x4b,0x5a,0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x53,
Expand Down
2 changes: 2 additions & 0 deletions src/backend/opencl/cl/rx/randomx.cl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "randomx_constants_keva.h"
#elif (ALGO == ALGO_RX_GRAFT)
#include "randomx_constants_graft.h"
#elif (ALGO == ALGO_RX_YADA)
#include "randomx_constants_yada.h"
#endif

#include "aes.cl"
Expand Down

0 comments on commit dabd7d8

Please sign in to comment.