Skip to content

Commit

Permalink
Merge pull request #2498 from fireice-uk/dev
Browse files Browse the repository at this point in the history
release 2.10.7
  • Loading branch information
fireice-uk committed Jul 31, 2019
2 parents 5869b9e + bb189ad commit fd19a5d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 29 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###### fireice-uk's and psychocrypt's
# XMR-Stak: Cryptonight All-in-One Mining Software

XMR-Stak is a universal open source stratum pool miner. This miner supports CPUs, AMD and NVIDIA GPUs and can be used various crypto currencies: Ryo, Monero, Turtlecoin, Graft, Bittube, Loki, Aeon and many more Cryptonight coins.
XMR-Stak is a universal open source stratum pool miner. This miner supports x86-64 CPUs, AMD and NVIDIA GPUs and can be used various crypto currencies: Ryo, Monero, Turtlecoin, Graft, Bittube, Loki, Aeon and many more Cryptonight coins.



Expand Down Expand Up @@ -52,16 +52,13 @@ Following coins can be mined using this miner:
- [Graft](https://www.graft.network)
- [Haven](https://havenprotocol.com)
- [Lethean](https://lethean.io)
- [Loki](https://loki.network/)
- [Masari](https://getmasari.org)
- [Monero](https://getmonero.org)
- [Plenteum](https://www.plenteum.com/)
- [QRL](https://theqrl.org)
- **[Ryo](https://ryo-currency.com) - Upcoming xmr-stak-gui is sponsored by Ryo Currency**
- [Torque](https://torque.cash/)
- [TurtleCoin](https://turtlecoin.lol)
- [Zelerius](https://zelerius.org/)
- [X-CASH](https://x-network.io/)

**[Ryo Currency](https://ryo-currency.com)** - is a way for us to implement the ideas that we were unable to in
Monero. See [here](https://github.com/fireice-uk/cryptonote-speedup-demo/) for details.
Expand Down
2 changes: 1 addition & 1 deletion doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Content Overview
* [Configurations](#configurations)
* [Usage on Windows](#usage-on-windows)
* [Usage on Linux](#usage-on-linux)
* [Usage on Linux & macOS](#usage-on-linux--macos)
* [Command Line Options](#command-line-options)
* [Use different backends](#use-different-backends)
* [HTML and JSON API report configuraton](#html-and-json-api-report-configuraton)
Expand Down
40 changes: 22 additions & 18 deletions xmrstak/backend/amd/autoAdjust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ class autoAdjust
}
}

// check if cryptonight_monero_v8 is selected for the user or dev pool
bool useCryptonight_v8 = (std::find(neededAlgorithms.begin(), neededAlgorithms.end(), cryptonight_monero_v8) != neededAlgorithms.end());

// true for all cryptonight_heavy derivates since we check the user and dev pool
bool useCryptonight_heavy = std::find(neededAlgorithms.begin(), neededAlgorithms.end(), cryptonight_heavy) != neededAlgorithms.end();

// true for cryptonight_gpu as main user pool algorithm
bool useCryptonight_gpu = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_gpu;

bool useCryptonight_r = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_r;

bool useCryptonight_r_wow = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_r_wow;

// 8 threads per block (this is a good value for the most gpus)
uint32_t default_workSize = 8;
size_t minFreeMem = 128u * byteToMiB;
/* 1000 is a magic selected limit, the reason is that more than 2GiB memory
* sowing down the memory performance because of TLB cache misses
Expand All @@ -130,6 +145,9 @@ class autoAdjust
* to avoid out of memory errors
*/
maxThreads = 2024u;

if(useCryptonight_gpu)
default_workSize = 16u;
}

// NVIDIA optimizations
Expand All @@ -142,19 +160,6 @@ class autoAdjust
minFreeMem = 512u * byteToMiB;
}

// check if cryptonight_monero_v8 is selected for the user or dev pool
bool useCryptonight_v8 = (std::find(neededAlgorithms.begin(), neededAlgorithms.end(), cryptonight_monero_v8) != neededAlgorithms.end());

// true for all cryptonight_heavy derivates since we check the user and dev pool
bool useCryptonight_heavy = std::find(neededAlgorithms.begin(), neededAlgorithms.end(), cryptonight_heavy) != neededAlgorithms.end();

// true for cryptonight_gpu as main user pool algorithm
bool useCryptonight_gpu = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_gpu;

bool useCryptonight_r = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_r;

bool useCryptonight_r_wow = ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() == cryptonight_r_wow;

// set strided index to default
ctx.stridedIndex = 1;

Expand Down Expand Up @@ -203,11 +208,11 @@ class autoAdjust
size_t perThread = hashMemSize + 240u;
size_t maxIntensity = memPerThread / perThread;
size_t possibleIntensity = std::min(maxThreads, maxIntensity);
// map intensity to a multiple of the compute unit count, 8 is the number of threads per work group
size_t intensity = (possibleIntensity / (8 * ctx.computeUnits)) * ctx.computeUnits * 8;
// map intensity to a multiple of the compute unit count, default_workSize is the number of threads per work group
size_t intensity = (possibleIntensity / (default_workSize * ctx.computeUnits)) * ctx.computeUnits * default_workSize;
// in the case we use two threads per gpu we can be relax and need no multiple of the number of compute units
if(numThreads == 2)
intensity = (possibleIntensity / 8) * 8;
intensity = (possibleIntensity / default_workSize) * default_workSize;

//If the intensity is 0, then it's because the multiple of the unit count is greater than intensity
if(intensity == 0)
Expand All @@ -225,9 +230,8 @@ class autoAdjust
conf += " // gpu: " + ctx.name + std::string(" compute units: ") + std::to_string(ctx.computeUnits) + "\n";
conf += " // memory:" + std::to_string(memPerThread / byteToMiB) + "|" +
std::to_string(ctx.maxMemPerAlloc / byteToMiB) + "|" + std::to_string(maxAvailableFreeMem / byteToMiB) + " MiB (used per thread|max per alloc|total free)\n";
// set 8 threads per block (this is a good value for the most gpus)
conf += std::string(" { \"index\" : ") + std::to_string(ctx.deviceIdx) + ",\n" +
" \"intensity\" : " + std::to_string(intensity) + ", \"worksize\" : " + std::to_string(8) + ",\n" +
" \"intensity\" : " + std::to_string(intensity) + ", \"worksize\" : " + std::to_string(default_workSize) + ",\n" +
" \"affine_to_cpu\" : false, \"strided_index\" : " + std::to_string(ctx.stridedIndex) + ", \"mem_chunk\" : 2,\n"
" \"unroll\" : " +
std::to_string(numUnroll) + ", \"comp_mode\" : true, \"interleave\" : " + std::to_string(ctx.interleave) + "\n" +
Expand Down
4 changes: 2 additions & 2 deletions xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ void cryptonight_core_gpu_hash(nvid_ctx* ctx, uint32_t nonce, const xmrstak_algo
if(blockSizePhase3 * 2 <= ctx->device_maxThreadsPerBlock)
{
blockSizePhase3 *= 2;
gridSizePhase3 = (blockSizePhase3 + 1) / 2;
gridSizePhase3 = (gridSizePhase3 + 1) / 2;
}
for(int i = 0; i < roundsPhase3; i++)
{
Expand Down Expand Up @@ -978,7 +978,7 @@ void cryptonight_core_gpu_hash_gpu(nvid_ctx* ctx, uint32_t nonce, const xmrstak_
if(blockSizePhase3 * 2 <= ctx->device_maxThreadsPerBlock)
{
blockSizePhase3 *= 2;
gridSizePhase3 = (blockSizePhase3 + 1) / 2;
gridSizePhase3 = (gridSizePhase3 + 1) / 2;
}

for(int i = 0; i < roundsPhase3; i++)
Expand Down
4 changes: 1 addition & 3 deletions xmrstak/jconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ xmrstak::coin_selection coins[] = {
{"qrl", {POW(cryptonight_monero)}, {POW(cryptonight_gpu)}, nullptr},
{"ryo", {POW(cryptonight_gpu)}, {POW(cryptonight_gpu)}, "pool.ryo-currency.com:3333"},
{"torque", {POW(cryptonight_v8_half)}, {POW(cryptonight_gpu)}, nullptr},
{"turtlecoin", {POW(cryptonight_turtle), 6u, POW(cryptonight_aeon)}, {POW(cryptonight_aeon)}, nullptr},
{"plenteum", {POW(cryptonight_turtle)}, {POW(cryptonight_turtle)}, nullptr},
{"zelerius", {POW(cryptonight_v8_zelerius), 7, POW(cryptonight_monero_v8)}, {POW(cryptonight_gpu)}, nullptr},
{"xcash", {POW(cryptonight_v8_double)}, {POW(cryptonight_gpu)}, nullptr}};
{"zelerius", {POW(cryptonight_v8_zelerius), 7, POW(cryptonight_monero_v8)}, {POW(cryptonight_gpu)}, nullptr}};

constexpr size_t coin_algo_size = (sizeof(coins) / sizeof(coins[0]));

Expand Down
2 changes: 1 addition & 1 deletion xmrstak/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endif

#define XMR_STAK_NAME "xmr-stak"
#define XMR_STAK_VERSION "2.10.6"
#define XMR_STAK_VERSION "2.10.7"

#if defined(_WIN32)
#define OS_TYPE "win"
Expand Down

0 comments on commit fd19a5d

Please sign in to comment.