Skip to content

vinchua/cuda-442-miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuda-442-miner

For cpen442 coin mining contest 2020. Hash rate is very hardware dependent. Since it is using CUDA, Nvidia GPU is mandatory.

Instructions

Run

python cudaminer.py

Requirements

python -m pip install requirements.txt

CUDA

The CUDA toolkit is required to compile the .cu and .cuh files.

nvcc -o cpen442hash main.cu -arch=sm_61

main.cu and kernel adapted from https://github.com/moffa13/SHA256CUDA

Because of std::cin ignoring spaces, including newlines, use getline(std::cin, in) instead.

$ nvcc -o hash_program main.cu

Example run:

james@acer-nitro5:~/src/cuda/SHA256CUDA$ ./hash_program 
Enter a message : This is a test
Nonce : 0
Difficulty : 7

Shared memory is 16400B
772009 hash(es)/s
Nonce : 8388608
30226098This is a test
00000001adff67cab9570a236d8490c0f5efee91e0303562e2d95ff7c3b7f3ec
james@acer-nitro5:~/src/cuda/SHA256CUDA$

On my system with a GTX 1050 GPU, I get 6.5-12 million hash/s. On my GTX 970, I get 135 millions hashes/s in Release mode and max speed optimization (-O2)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published