Skip to content

Commit

Permalink
Merge pull request #18 from alephium/use-new-config-by-default
Browse files Browse the repository at this point in the history
Use new config for grid and block as default
  • Loading branch information
polarker authored Nov 24, 2021
2 parents 00baa64 + af11a35 commit fa169fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Please make sure that you have installed Nvidia driver for you GPU. You could ve
1. Build the miner by running `curl -L https://github.com/alephium/gpu-miner/raw/master/get-miner.sh | bash`
2. Run `gpu-miner/run-miner.sh` to start the miner

You could specify the miner api with `-a broker` parameters, GPU indexes with `-g 1 2` and enable the alternate GPU init with '-n'.

The alternate GPU init shouldn't have much impact on linux, but is very important on windows.
You could specify the miner api with `-a broker` parameters, GPU indexes with `-g 1 2` and enable the alternate GPU init with '-o'. The alternate GPU init might improve performance for some cards.

### Windows miner from source code

Expand All @@ -32,8 +30,6 @@ The alternate GPU init shouldn't have much impact on linux, but is very importan

Executable file will be generated in `your-gpu-miner-dir/bin/` directory.

For best results, try to start the gpu-miner on windows using the alternate GPU init with '-n', as it can improve massively the mining speed on windows.

If you have any questions, please reach out to us on Discord.

### Pre-built miner
Expand Down
2 changes: 1 addition & 1 deletion src/blake3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void config_cuda(int device_id, int *grid_size, int *block_size, int new_grid_ca
cudaOccupancyMaxPotentialBlockSize(grid_size, block_size, blake3_hasher_mine);

int cores_size = get_device_cores(device_id);
if (new_grid_calc == 1){
if (new_grid_calc) {
cudaDeviceProp props;
cudaGetDeviceProperties(&props, device_id);
*grid_size = props.multiProcessorCount;
Expand Down
8 changes: 4 additions & 4 deletions src/main.cu
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ int main(int argc, char **argv)
char broker_ip[16];
strcpy(broker_ip, "127.0.0.1");

int new_grid_calc = 0;
bool new_grid_calc = false;
int command;
while ((command = getopt(argc, argv, "g:a:n")) != -1)
while ((command = getopt(argc, argv, "g:a:o")) != -1)
{
switch (command)
{
Expand Down Expand Up @@ -370,8 +370,8 @@ int main(int argc, char **argv)
use_device[device] = true;
}
break;
case 'n':
new_grid_calc = true;
case 'o':
new_grid_calc = false;
break;
default:
printf("Invalid command %c\n", command);
Expand Down

0 comments on commit fa169fe

Please sign in to comment.