Cleanup MoneroOcean patchset
This commit is contained in:
parent
aaaaf5c1ed
commit
c4ff8c4064
49 changed files with 2094 additions and 2237 deletions
|
@ -143,13 +143,13 @@ bool xmrig::CpuWorker<N>::selfTest()
|
|||
verify(Algorithm::CN_XAO, test_output_xao) &&
|
||||
verify(Algorithm::CN_RTO, test_output_rto) &&
|
||||
verify(Algorithm::CN_HALF, test_output_half) &&
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
verify(Algorithm::CN_GPU, test_output_gpu) &&
|
||||
# endif
|
||||
verify2(Algorithm::CN_R, test_output_r) &&
|
||||
verify(Algorithm::CN_RWZ, test_output_rwz) &&
|
||||
verify(Algorithm::CN_ZLS, test_output_zls) &&
|
||||
verify(Algorithm::CN_CCX, test_output_ccx) &&
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
verify(Algorithm::CN_GPU, test_output_gpu) &&
|
||||
# endif
|
||||
verify(Algorithm::CN_DOUBLE, test_output_double);
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
|
@ -254,22 +254,14 @@ void xmrig::CpuWorker<N>::start()
|
|||
|
||||
if (first) {
|
||||
first = false;
|
||||
if (job.algorithm() == Algorithm::RX_DEFYX) {
|
||||
defyx_calculate_hash_first(m_vm, tempHash, m_job.blob(), job.size());
|
||||
} else {
|
||||
randomx_calculate_hash_first(m_vm, tempHash, m_job.blob(), job.size());
|
||||
}
|
||||
randomx_calculate_hash_first(m_vm, tempHash, m_job.blob(), job.size(), job.algorithm());
|
||||
}
|
||||
|
||||
if (!nextRound(m_job)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (job.algorithm() == Algorithm::RX_DEFYX) {
|
||||
defyx_calculate_hash_next(m_vm, tempHash, m_job.blob(), job.size(), m_hash);
|
||||
} else {
|
||||
randomx_calculate_hash_next(m_vm, tempHash, m_job.blob(), job.size(), m_hash);
|
||||
}
|
||||
randomx_calculate_hash_next(m_vm, tempHash, m_job.blob(), job.size(), m_hash, job.algorithm());
|
||||
}
|
||||
else
|
||||
# endif
|
||||
|
|
|
@ -228,12 +228,6 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
return 1;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return count;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
if (algorithm.family() == Algorithm::CN_LITE) {
|
||||
return CpuThreads(count, 1);
|
||||
|
@ -278,6 +272,12 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return count;
|
||||
}
|
||||
# endif
|
||||
|
||||
return CpuThreads(std::max<size_t>(count / 2, 1), 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,20 +51,6 @@ public:
|
|||
setIntensity(intensity);
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
OclThread(uint32_t index, uint32_t intensity, uint32_t worksize, uint32_t threads, uint32_t unrollFactor) :
|
||||
m_fields(0),
|
||||
m_threads(threads, -1),
|
||||
m_index(index),
|
||||
m_memChunk(0),
|
||||
m_stridedIndex(0),
|
||||
m_unrollFactor(unrollFactor),
|
||||
m_worksize(worksize)
|
||||
{
|
||||
setIntensity(intensity);
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
OclThread(uint32_t index, uint32_t intensity, uint32_t worksize, uint32_t threads, bool gcnAsm, bool datasetHost, uint32_t bfactor) :
|
||||
m_datasetHost(datasetHost),
|
||||
|
@ -109,6 +95,20 @@ public:
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
OclThread(uint32_t index, uint32_t intensity, uint32_t worksize, uint32_t threads, uint32_t unrollFactor) :
|
||||
m_fields(0),
|
||||
m_threads(threads, -1),
|
||||
m_index(index),
|
||||
m_memChunk(0),
|
||||
m_stridedIndex(0),
|
||||
m_unrollFactor(unrollFactor),
|
||||
m_worksize(worksize)
|
||||
{
|
||||
setIntensity(intensity);
|
||||
}
|
||||
# endif
|
||||
|
||||
OclThread(const rapidjson::Value &value);
|
||||
|
||||
inline bool isAsm() const { return m_gcnAsm; }
|
||||
|
|
|
@ -116,14 +116,16 @@ xmrig::OclWorker::OclWorker(size_t id, const OclLaunchData &data) :
|
|||
# endif
|
||||
break;
|
||||
|
||||
case Algorithm::CN_GPU:
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
m_runner = new OclRyoRunner(id, data);
|
||||
# endif
|
||||
break;
|
||||
|
||||
default:
|
||||
m_runner = new OclCnRunner(id, data);
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (m_algorithm == Algorithm::CN_GPU) {
|
||||
m_runner = new OclRyoRunner(id, data);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
m_runner = new OclCnRunner(id, data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#include "base/crypto/Algorithm.h"
|
||||
|
||||
|
||||
#ifdef XMRIG_ALGO_CN_GPU
|
||||
# include "backend/opencl/cl/cn/cryptonight_gpu_cl.h"
|
||||
#endif
|
||||
|
||||
#ifdef XMRIG_ALGO_RANDOMX
|
||||
# include "backend/opencl/cl/rx/randomx_cl.h"
|
||||
#endif
|
||||
|
@ -45,6 +41,10 @@
|
|||
# include "backend/opencl/cl/kawpow/kawpow_dag_cl.h"
|
||||
#endif
|
||||
|
||||
#ifdef XMRIG_ALGO_CN_GPU
|
||||
# include "backend/opencl/cl/cn/cryptonight_gpu_cl.h"
|
||||
#endif
|
||||
|
||||
|
||||
const char *xmrig::OclSource::get(const Algorithm &algorithm)
|
||||
{
|
||||
|
|
|
@ -9,26 +9,26 @@
|
|||
#define ALGO_CN_RWZ 8
|
||||
#define ALGO_CN_ZLS 9
|
||||
#define ALGO_CN_DOUBLE 10
|
||||
#define ALGO_CN_GPU 11
|
||||
#define ALGO_CN_LITE_0 12
|
||||
#define ALGO_CN_LITE_1 13
|
||||
#define ALGO_CN_HEAVY_0 14
|
||||
#define ALGO_CN_HEAVY_TUBE 15
|
||||
#define ALGO_CN_HEAVY_XHV 16
|
||||
#define ALGO_CN_PICO_0 17
|
||||
#define ALGO_CN_PICO_TLO 18
|
||||
#define ALGO_CN_CCX 19
|
||||
#define ALGO_CN_LITE_0 11
|
||||
#define ALGO_CN_LITE_1 12
|
||||
#define ALGO_CN_HEAVY_0 13
|
||||
#define ALGO_CN_HEAVY_TUBE 14
|
||||
#define ALGO_CN_HEAVY_XHV 15
|
||||
#define ALGO_CN_PICO_0 16
|
||||
#define ALGO_CN_PICO_TLO 17
|
||||
#define ALGO_CN_CCX 18
|
||||
#define ALGO_CN_GPU 19
|
||||
#define ALGO_RX_0 20
|
||||
#define ALGO_RX_WOW 21
|
||||
#define ALGO_RX_LOKI 22
|
||||
#define ALGO_RX_ARQ 23
|
||||
#define ALGO_RX_SFX 24
|
||||
#define ALGO_RX_KEVA 25
|
||||
#define ALGO_RX_DEFYX 26
|
||||
#define ALGO_AR2_CHUKWA 27
|
||||
#define ALGO_AR2_WRKZ 28
|
||||
#define ALGO_ASTROBWT_DERO 29
|
||||
#define ALGO_KAWPOW_RVN 30
|
||||
#define ALGO_AR2_CHUKWA 26
|
||||
#define ALGO_AR2_WRKZ 27
|
||||
#define ALGO_ASTROBWT_DERO 28
|
||||
#define ALGO_KAWPOW_RVN 29
|
||||
#define ALGO_RX_DEFYX 30
|
||||
|
||||
#define FAMILY_UNKNOWN 0
|
||||
#define FAMILY_CN 1
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -87,7 +87,7 @@ inline global int4* scratchpad_ptr(uint idx, uint n, __global int *lpad) { retur
|
|||
|
||||
inline float4 fma_break(float4 x)
|
||||
{
|
||||
// Break the dependency chain by setitng the exp to ?????01
|
||||
// Break the dependency chain by setting the exp to ?????01
|
||||
x = _mm_and_ps(x, 0xFEFFFFFF);
|
||||
return _mm_or_ps(x, 0x00800000);
|
||||
}
|
||||
|
|
|
@ -11,22 +11,22 @@ static const char randomx_cl[130649] = {
|
|||
0x5f,0x43,0x4e,0x5f,0x52,0x54,0x4f,0x20,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x52,0x57,0x5a,0x20,0x38,0x0a,
|
||||
0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x5a,0x4c,0x53,0x20,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,
|
||||
0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x44,0x4f,0x55,0x42,0x4c,0x45,0x20,0x31,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,
|
||||
0x47,0x50,0x55,0x20,0x31,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x5f,0x30,0x20,0x31,0x32,
|
||||
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x5f,0x31,0x20,0x31,0x33,0x0a,0x23,0x64,0x65,0x66,0x69,
|
||||
0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x30,0x20,0x31,0x34,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,
|
||||
0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x54,0x55,0x42,0x45,0x20,0x31,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,
|
||||
0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x58,0x48,0x56,0x20,0x31,0x36,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,
|
||||
0x5f,0x50,0x49,0x43,0x4f,0x5f,0x30,0x20,0x31,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x50,0x49,0x43,0x4f,0x5f,
|
||||
0x54,0x4c,0x4f,0x20,0x31,0x38,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x43,0x43,0x58,0x20,0x31,0x39,0x0a,0x23,0x64,
|
||||
0x4c,0x49,0x54,0x45,0x5f,0x30,0x20,0x31,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x5f,0x31,
|
||||
0x20,0x31,0x32,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x30,0x20,0x31,0x33,0x0a,0x23,
|
||||
0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x54,0x55,0x42,0x45,0x20,0x31,0x34,0x0a,0x23,0x64,0x65,
|
||||
0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x5f,0x58,0x48,0x56,0x20,0x31,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,
|
||||
0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x50,0x49,0x43,0x4f,0x5f,0x30,0x20,0x31,0x36,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,
|
||||
0x5f,0x43,0x4e,0x5f,0x50,0x49,0x43,0x4f,0x5f,0x54,0x4c,0x4f,0x20,0x31,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,
|
||||
0x43,0x43,0x58,0x20,0x31,0x38,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x47,0x50,0x55,0x20,0x31,0x39,0x0a,0x23,0x64,
|
||||
0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x30,0x20,0x32,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,
|
||||
0x52,0x58,0x5f,0x57,0x4f,0x57,0x20,0x32,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x4c,0x4f,0x4b,0x49,0x20,0x32,
|
||||
0x32,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x41,0x52,0x51,0x20,0x32,0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,
|
||||
0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x32,0x34,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,
|
||||
0x4b,0x45,0x56,0x41,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x44,0x45,0x46,0x59,0x58,0x20,0x32,0x36,
|
||||
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,0x32,0x37,0x0a,0x23,0x64,0x65,0x66,
|
||||
0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,0x20,0x32,0x38,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,
|
||||
0x4f,0x5f,0x41,0x53,0x54,0x52,0x4f,0x42,0x57,0x54,0x5f,0x44,0x45,0x52,0x4f,0x20,0x32,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,
|
||||
0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,0x52,0x56,0x4e,0x20,0x33,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b,
|
||||
0x4b,0x45,0x56,0x41,0x20,0x32,0x35,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,
|
||||
0x32,0x36,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,0x20,0x32,0x37,0x0a,0x23,0x64,0x65,0x66,
|
||||
0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x53,0x54,0x52,0x4f,0x42,0x57,0x54,0x5f,0x44,0x45,0x52,0x4f,0x20,0x32,0x38,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,
|
||||
0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,0x52,0x56,0x4e,0x20,0x32,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,
|
||||
0x4f,0x5f,0x52,0x58,0x5f,0x44,0x45,0x46,0x59,0x58,0x20,0x33,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b,
|
||||
0x4e,0x4f,0x57,0x4e,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x20,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,
|
||||
0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x20,0x32,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,
|
||||
0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x20,0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2019 SChernykh
|
||||
|
||||
This file is part of RandomX OpenCL.
|
||||
|
||||
RandomX OpenCL is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RandomX OpenCL is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with RandomX OpenCL. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//Dataset base size in bytes. Must be a power of 2.
|
||||
#define RANDOMX_DATASET_BASE_SIZE 2147483648
|
||||
|
||||
//Dataset extra size. Must be divisible by 64.
|
||||
#define RANDOMX_DATASET_EXTRA_SIZE 33554368
|
||||
|
||||
//Scratchpad L3 size in bytes. Must be a power of 2.
|
||||
#define RANDOMX_SCRATCHPAD_L3 2097152
|
||||
|
||||
//Scratchpad L2 size in bytes. Must be a power of two and less than or equal to RANDOMX_SCRATCHPAD_L3.
|
||||
#define RANDOMX_SCRATCHPAD_L2 262144
|
||||
|
||||
//Scratchpad L1 size in bytes. Must be a power of two (minimum 64) and less than or equal to RANDOMX_SCRATCHPAD_L2.
|
||||
#define RANDOMX_SCRATCHPAD_L1 16384
|
||||
|
||||
//Jump condition mask size in bits.
|
||||
#define RANDOMX_JUMP_BITS 8
|
||||
|
||||
//Jump condition mask offset in bits. The sum of RANDOMX_JUMP_BITS and RANDOMX_JUMP_OFFSET must not exceed 16.
|
||||
#define RANDOMX_JUMP_OFFSET 8
|
||||
|
||||
//Integer instructions
|
||||
#define RANDOMX_FREQ_IADD_RS 16
|
||||
#define RANDOMX_FREQ_IADD_M 7
|
||||
#define RANDOMX_FREQ_ISUB_R 16
|
||||
#define RANDOMX_FREQ_ISUB_M 7
|
||||
#define RANDOMX_FREQ_IMUL_R 16
|
||||
#define RANDOMX_FREQ_IMUL_M 4
|
||||
#define RANDOMX_FREQ_IMULH_R 4
|
||||
#define RANDOMX_FREQ_IMULH_M 1
|
||||
#define RANDOMX_FREQ_ISMULH_R 4
|
||||
#define RANDOMX_FREQ_ISMULH_M 1
|
||||
#define RANDOMX_FREQ_IMUL_RCP 8
|
||||
#define RANDOMX_FREQ_INEG_R 2
|
||||
#define RANDOMX_FREQ_IXOR_R 15
|
||||
#define RANDOMX_FREQ_IXOR_M 5
|
||||
#define RANDOMX_FREQ_IROR_R 8
|
||||
#define RANDOMX_FREQ_IROL_R 2
|
||||
#define RANDOMX_FREQ_ISWAP_R 4
|
||||
|
||||
//Floating point instructions
|
||||
#define RANDOMX_FREQ_FSWAP_R 4
|
||||
#define RANDOMX_FREQ_FADD_R 16
|
||||
#define RANDOMX_FREQ_FADD_M 5
|
||||
#define RANDOMX_FREQ_FSUB_R 16
|
||||
#define RANDOMX_FREQ_FSUB_M 5
|
||||
#define RANDOMX_FREQ_FSCAL_R 6
|
||||
#define RANDOMX_FREQ_FMUL_R 32
|
||||
#define RANDOMX_FREQ_FDIV_M 4
|
||||
#define RANDOMX_FREQ_FSQRT_R 6
|
||||
|
||||
//Control instructions
|
||||
#define RANDOMX_FREQ_CBRANCH 25
|
||||
#define RANDOMX_FREQ_CFROUND 1
|
||||
|
||||
//Store instruction
|
||||
#define RANDOMX_FREQ_ISTORE 16
|
||||
|
||||
//No-op instruction
|
||||
#define RANDOMX_FREQ_NOP 0
|
||||
|
||||
#define RANDOMX_DATASET_ITEM_SIZE 64
|
||||
|
||||
#define RANDOMX_PROGRAM_SIZE 256
|
||||
|
||||
#define HASH_SIZE 64
|
||||
#define ENTROPY_SIZE (128 + RANDOMX_PROGRAM_SIZE * 8)
|
||||
#define REGISTERS_SIZE 256
|
||||
#define IMM_BUF_SIZE (RANDOMX_PROGRAM_SIZE * 4 - REGISTERS_SIZE)
|
||||
#define IMM_INDEX_COUNT ((IMM_BUF_SIZE / 4) - 2)
|
||||
#define VM_STATE_SIZE (REGISTERS_SIZE + IMM_BUF_SIZE + RANDOMX_PROGRAM_SIZE * 4)
|
||||
#define ROUNDING_MODE (RANDOMX_FREQ_CFROUND ? -1 : 0)
|
||||
|
||||
// Scratchpad L1/L2/L3 bits
|
||||
#define LOC_L1 (32 - 14)
|
||||
#define LOC_L2 (32 - 18)
|
||||
#define LOC_L3 (32 - 21)
|
|
@ -61,13 +61,13 @@ extern bool ocl_generic_astrobwt_generator(const OclDevice& device, const Algori
|
|||
extern bool ocl_generic_kawpow_generator(const OclDevice& device, const Algorithm& algorithm, OclThreads& threads);
|
||||
#endif
|
||||
|
||||
extern bool ocl_vega_cn_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads);
|
||||
extern bool ocl_generic_cn_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads);
|
||||
|
||||
#ifdef XMRIG_ALGO_CN_GPU
|
||||
extern bool ocl_generic_cn_gpu_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads);
|
||||
#endif
|
||||
|
||||
extern bool ocl_vega_cn_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads);
|
||||
extern bool ocl_generic_cn_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads);
|
||||
|
||||
|
||||
static ocl_gen_config_fun generators[] = {
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
|
@ -79,11 +79,11 @@ static ocl_gen_config_fun generators[] = {
|
|||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
ocl_generic_kawpow_generator,
|
||||
# endif
|
||||
ocl_vega_cn_generator,
|
||||
ocl_generic_cn_generator,
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
ocl_generic_cn_gpu_generator,
|
||||
# endif
|
||||
ocl_vega_cn_generator,
|
||||
ocl_generic_cn_generator
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue