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

Fix lack of uniqueId on AMD GPU OpenCL without AMD extensions #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pjakma
Copy link

@pjakma pjakma commented Jul 10, 2021

AMD GPU systems need not have a functional
clGetDeviceInfo(..., CL_DEVICE_TOPOLOGY_AMD, ...).

E.g., Fedora OpenCL with AMD GPU drivers, it seems. As the code stands it
doesn't create a uniqueId, and leaves it null. If there are multiple GPUs,
the device info is stored to null uniqueId and overwritten - and only one of
these GPUs will be enumerated and visible to the miner.

Fix this by providing a fall-back, constructing the uniqueId from the
platform and device indexes. As is already the case for Intel GPU and CPU
devices.

Additionally, cosmetically, add a clearer, more self-describing struct for
the AMD topology data.

To get Hunter to work I had to update the Boost version.
The previously specified version is no longer available for hunter to download.

pjakma added 2 commits July 10, 2021 10:58
AMD GPU systems need not have a functional
clGetDeviceInfo(..., CL_DEVICE_TOPOLOGY_AMD, ...).

E.g., Fedora OpenCL with AMD GPU drivers, it seems.  As the code stands it
doesn't create a uniqueId, and leaves it null.  If there are multiple GPUs,
the device info is stored to null uniqueId and overwritten - and only one of
these GPUs will be enumerated and visible to the miner.

Fix this by providing a fall-back, constructing the uniqueId from the
platform and device indexes.  As is already the case for Intel GPU and CPU
devices.

Additionally, cosmetically, add a clearer, more self-describing struct for
the AMD topology data.
Hard coded Boost 1.66.0 no longer available, cmake fails.

Use the built-in Hunter default.
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