build on rockm

This commit is contained in:
Dobromir Popov
2025-09-05 22:28:14 +03:00
parent f62fbd3730
commit 856faefc1a
32 changed files with 5198 additions and 330 deletions

View File

@@ -0,0 +1,49 @@
# RinHash ROCm GPU Direct Integration
This build uses the existing `cpuminer-rocm-build` container to avoid dependency issues.
## Files Created
### GPU Libraries (`gpu-libs/`)
- `librinhash_hip.so` - Shared library for GPU acceleration
- `*.cuh` - Header files for GPU functions
## Usage
### 1. Copy GPU library to system
```bash
sudo cp gpu-libs/librinhash_hip.so /usr/local/lib/
sudo ldconfig
```
### 2. For cpuminer integration
Modify your cpuminer RinHash implementation to use GPU functions:
```c
#include <dlfcn.h>
// Load GPU library
void* gpu_lib = dlopen("librinhash_hip.so", RTLD_LAZY);
if (gpu_lib) {
// Use GPU functions
rinhash_cuda_function = dlsym(gpu_lib, "rinhash_cuda");
}
```
### 3. Build cpuminer with GPU support
```bash
./configure CFLAGS="-O3 -march=native"
make -j$(nproc)
```
## Testing
Test GPU support:
```bash
rocm-smi # Check GPU availability
```
Test library loading:
```bash
ldd librinhash_hip.so
```