Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

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

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.

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.
The hard coded 1.66.0 Boost in Hunter no longer downloads, breaking the build.
Change to the default hunter version.
@pjakma
Copy link
Author

pjakma commented Jul 27, 2021

Ping, anyone able to have a look?

Copy link

@Ahmadchurra681 Ahmadchurra681 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants