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

opencl: adjust threads and blocks options. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boymanjor
Copy link
Contributor

The default threads (total work items) and blocks (work group size) cli
options have the potential to cause errors for opencl capable devices.
This commit makes sure the options are lowered to the device's default
values, if necessary. If the resultant total work items value is not
divisible by the work group size, the total work items value is lowered
to the closest multiple of the work group size. We also print the values
to alert users of any changes to cli options.

This PR is a:

  • Bugfix
  • Feature
  • Optimization
  • Documentation

Checklist:

  • npm run install-regtest 🆗
  • npm run lint 🆗
  • npm run test 🆗
  • bin/hs-miner 🆗 (mining against regtest reports no errors)

If this PR is an optimization, please report benchmarks along with your device
name:

The default threads (total work items) and blocks (work group size) cli
options have the potential to cause errors for opencl capable devices.
This commit makes sure the options are lowered to the device's default
values, if necessary. If the resultant total work items value is not
divisible by the work group size, the total work items value is lowered
to the closest multiple of the work group size. We also print the values
to alert users of any changes to cli options.
@boymanjor
Copy link
Contributor Author

boymanjor commented Feb 20, 2020

Fixes #16.

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.

1 participant