build on rockm
This commit is contained in:
49
rin/miner/rocm-direct-output/integration/README.md
Normal file
49
rin/miner/rocm-direct-output/integration/README.md
Normal 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
|
||||
```
|
Reference in New Issue
Block a user