Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ OBJET = $(addprefix $(OBJDIR)/, \
rummage.o \
)

CCAP = 86
CUDA = /usr/local/cuda-11.8
CCAP ?= 86
CUDA ?= /usr/local/cuda
CXX = g++
CXXCUDA = /usr/bin/g++

Expand All @@ -42,7 +42,7 @@ NVCC = $(CUDA)/bin/nvcc
all: rummage

$(OBJDIR)/GPU/GPURummage.o: $(SRCDIR)/GPU/GPURummage.cu
$(NVCC) -allow-unsupported-compiler --compile --compiler-options -fPIC -ccbin $(CXXCUDA) -m64 -O2 -I$(SRCDIR) -I$(CUDA)/include \
$(NVCC) -allow-unsupported-compiler --compile --compiler-options -fPIC -Xcompiler -U_GNU_SOURCE -ccbin $(CXXCUDA) -m64 -O2 -I$(SRCDIR) -I$(CUDA)/include \
-DNOSTR_BLOCKS_PER_GRID=$(NOSTR_BLOCKS_PER_GRID) \
-DNOSTR_THREADS_PER_BLOCK=$(NOSTR_THREADS_PER_BLOCK) \
-DKEYS_PER_THREAD_BATCH=$(KEYS_PER_THREAD_BATCH) \
Expand Down
24 changes: 19 additions & 5 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For known good configurations and performance results, see [PERFORMANCE.md](PERF
### Linux (CUDA)

**Required:**
- CUDA Toolkit (11.x or 12.x)
- CUDA Toolkit (11.x, 12.x, or 13.x)
- GMP library (GNU Multiple Precision)
- g++ compiler

Expand Down Expand Up @@ -112,6 +112,7 @@ CCAP = 86
```

**Common compute capabilities:**
- RTX 50-series (Blackwell): `120`
- RTX 40-series (Ada): `89`
- RTX 30-series (Ampere): `86`
- RTX 20-series (Turing): `75`
Expand All @@ -120,20 +121,33 @@ CCAP = 86

Find your GPU's compute capability at: https://developer.nvidia.com/cuda-gpus

`CCAP` can also be overridden without editing the Makefile, e.g. `make CCAP=120`.

## CUDA Installation Path

Update the CUDA path if installed in a non-standard location:
The Makefile defaults to `CUDA = /usr/local/cuda`, which is normally a symlink to
whichever version you last installed. If you have multiple CUDA versions installed
and need a specific one, override it on the command line instead of editing the
Makefile:

**In Makefile, line 21:**
```make
CUDA = /usr/local/cuda-11.8
```bash
make CUDA=/usr/local/cuda-11.8
```

Check your CUDA version:
```bash
nvcc --version
```

**Newer glibc (2.39+) build error:**
```
error: exception specification is incompatible with that of previous function "rsqrt"
```
This happens because recent glibc versions declare `rsqrt`/`rsqrtf` (C23 extensions)
with a different exception specification than CUDA's `math_functions.h`. The Makefile
already compiles `GPURummage.cu` with `-Xcompiler -U_GNU_SOURCE` to avoid pulling in
those glibc declarations, which resolves the conflict on CUDA 11.8 through 13.x.

## GPU Performance Tuning

For optimal performance, tune these parameters in the Makefile:
Expand Down