Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CUDA implementation #195

Merged
merged 3 commits into from Sep 6, 2023
Merged

Add CUDA implementation #195

merged 3 commits into from Sep 6, 2023

Conversation

matheusd
Copy link
Member

@matheusd matheusd commented Sep 6, 2023

This PR adds CUDA support for the Blake3 hashing algorithm to gominer, replacing the previous Blake256 implementation.

Note that the Windows version of the CUDA build of gominer has not been validated as working yet.

This is only a very quick fix to prevent it deadlocking during shutdown.
This switches the CUDA implementation of gominer to use the new Blake3
hashing function.

The CUDA implementation uses the same optimized kernel as the one
developed for the OpenCL implementation, with the necessary changes to
make it compile with the CUDA toolkit.
The size of the job sent to the GPU is gridsize * threadcount. The
thread count can be roughly predetermined, based on the properties of
the kernel and the currently available device families. This is
currently set by default as 256.

Autocalibration is done in a similar fashion to the OpenCL one, by
determining the size where each job takes about 500ms.
@davecgh davecgh merged commit 9e1209a into decred:master Sep 6, 2023
2 checks passed
@matheusd matheusd deleted the cuda branch September 6, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants