summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md (renamed from CONTIBUTING.md)0
-rw-r--r--doc/compile.md24
-rw-r--r--doc/compile_Windows.md2
-rw-r--r--xmrstak/backend/amd/autoAdjust.hpp9
4 files changed, 20 insertions, 15 deletions
diff --git a/CONTIBUTING.md b/CONTRIBUTING.md
index 1f0bd1b..1f0bd1b 100644
--- a/CONTIBUTING.md
+++ b/CONTRIBUTING.md
diff --git a/doc/compile.md b/doc/compile.md
index 46d39cb..8ad410d 100644
--- a/doc/compile.md
+++ b/doc/compile.md
@@ -18,13 +18,13 @@ By default the miner will be build with all dependencies. Each optional dependen
There are two easy ways to set variables for `cmake` to configure *xmr-stak*
- use the ncurses GUI
- - `ccmake .`
+ - `ccmake ..`
- edit your options
- end the GUI by pressing the key `c`(create) and than `g`(generate)
- set Options on the command line
- - enable a option: `cmake . -DNAME_OF_THE_OPTION=ON`
- - disable a option `cmake . -DNAME_OF_THE_OPTION=OFF`
- - set a value `cmake . -DNAME_OF_THE_OPTION=value`
+ - enable a option: `cmake .. -DNAME_OF_THE_OPTION=ON`
+ - disable a option `cmake .. -DNAME_OF_THE_OPTION=OFF`
+ - set a value `cmake .. -DNAME_OF_THE_OPTION=value`
After the configuration you need to compile the miner, follow the guide for your platform:
* [Compile in Windows](compile_Windows.md)
@@ -33,17 +33,17 @@ After the configuration you need to compile the miner, follow the guide for your
## Generic Build Options
- `CMAKE_INSTALL_PREFIX` install miner to the home folder
- - `cmake . -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak-cpu`
+ - `cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak-cpu`
- you can find the binary and the `config.txt` file after `make install` in `$HOME/xmr-stak-cpu/bin`
- `CMAKE_LINK_STATIC` link libgcc and libstdc++ libraries static (default OFF)
- - disable with `cmake . -DCMAKE_LINK_STATIC=ON`
+ - disable with `cmake .. -DCMAKE_LINK_STATIC=ON`
- `CMAKE_BUILD_TYPE` set the build type
- valid options: `Release` or `Debug`
- you should always keep `Release` for your productive miners
- `MICROHTTPD_ENABLE` allow to disable/enable the dependency *microhttpd*
- - there is no *http* interface available if option is disabled: `cmake . -DMICROHTTPD_ENABLE=OFF`
+ - there is no *http* interface available if option is disabled: `cmake .. -DMICROHTTPD_ENABLE=OFF`
- `OpenSSL_ENABLE` allow to disable/enable the dependency *OpenSSL*
- - it is not possible to connect to a *https* secured pool if option is disabled: `cmake . -DOpenSSL_ENABLE=OFF`
+ - it is not possible to connect to a *https* secured pool if option is disabled: `cmake .. -DOpenSSL_ENABLE=OFF`
## CPU Build Options
@@ -61,7 +61,7 @@ After the configuration you need to compile the miner, follow the guide for your
- `CUDA_ENABLE` allow to disable/enable the NVIDIA backend of the miner
- `CUDA_ARCH` build for a certain compute architecture
- this option needs a semicolon separated list
- - `cmake . -DCUDA_ARCH=61` or `cmake . -DCUDA_ARCH=20;61`
+ - `cmake .. -DCUDA_ARCH=61` or `cmake .. -DCUDA_ARCH=20;61`
- [list](https://developer.nvidia.com/cuda-gpus) with NVIDIA compute architectures
- by default the miner is created for all currently available compute architectures
- `CUDA_COMPILER` select the compiler for the device code
@@ -70,12 +70,12 @@ After the configuration you need to compile the miner, follow the guide for your
# compile host and device code with clang
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
- cmake . -DCUDA_COMPILER=clang
+ cmake .. -DCUDA_COMPILER=clang
```
- `XMR-STAK_LARGEGRID` use `32` or `64` bit integer for on device indices
- default is enabled
- - on old GPUs it can increase the hash rate if disabled: `cmake . -DXMR-STAK_LARGEGRID=OFF`
+ - on old GPUs it can increase the hash rate if disabled: `cmake .. -DXMR-STAK_LARGEGRID=OFF`
- if disabled it is not allowed to use more than `1000` threads on the device
- `XMR-STAK_THREADS` give the compiler information which value for `threads` is used at runtime
- default is `0` (compile time optimization)
- - if the miner is compiled and used at runtime with the some value it can increase the hash rate: `cmake . -DXMR-STAK_THREADS=32`
+ - if the miner is compiled and used at runtime with the some value it can increase the hash rate: `cmake .. -DXMR-STAK_THREADS=32`
diff --git a/doc/compile_Windows.md b/doc/compile_Windows.md
index dec1e75..ffe9e23 100644
--- a/doc/compile_Windows.md
+++ b/doc/compile_Windows.md
@@ -58,7 +58,7 @@
## Compile
-- download and unzip `xmr-stak
+- download and unzip `xmr-stak`
- open the command line terminal `cmd`
- `cd` to your unzipped source code directory
- execute the following commands (NOTE: path to VS2017 can be different)
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp
index 6157b25..ebe59df 100644
--- a/xmrstak/backend/amd/autoAdjust.hpp
+++ b/xmrstak/backend/amd/autoAdjust.hpp
@@ -79,6 +79,8 @@ private:
configEditor configTpl{};
configTpl.set( std::string(tpl) );
+ constexpr size_t byteToMiB = 1024u * 1024u;
+
std::string conf;
int i = 0;
for(auto& ctx : devVec)
@@ -89,8 +91,11 @@ private:
size_t perThread = (size_t(1u)<<21) + 224u;
size_t max_intensity = availableMem / perThread;
// 1000 is a magic selected limit \todo select max intensity depending of the gpu type
- size_t intensity = std::min( size_t(1000u) , max_intensity );
- conf += std::string(" // gpu: ") + ctx.name + "\n";
+ size_t possibleIntensity = std::min( size_t(1000u) , max_intensity );
+ // 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;
+ conf += std::string(" // gpu: ") + ctx.name + " memory:" + std::to_string(availableMem / byteToMiB) + "\n";
+ conf += std::string(" // compute units: ") + std::to_string(ctx.computeUnits) + "\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" +
OpenPOWER on IntegriCloud