Open yuzi-co opened 6 years ago
Hello.
From Windows only perspective it may look pretty straightforward. There is only 1 platform, where you can tweak and rely on some undefined befaviour. However my implementation also works on Linux.
The order in which devices are listed is platform implementation defined. PCIeBusId is a solution to this problem. It is a bridge between a logical OpenCL device and real physical device. However, sometimes even this is not 100% reliable solution. It is possible to generate a configuration file with raw device list and select device/platform combination by index. lyclMiner -gr lyclMiner.conf
Miner already autodetects them during the config generation. It is possible to implement this in future, as "auto" value both for BinaryFormat and AsmProgram. Configuration option is still required in case automatic detection fails.
This was never on my roadmap. lyclMiner runs on cpuminer-multi codebase, so it will be relatively easy to port API from it with minimal changes and add some options inside a configuration file.
Black box approach is not a good idea in this case. e.g. WorkSize parameter requies tweaking for each GPU and platform to get the best performance. Even if you find the best value using benchmark, it doesn't mean that it will remain stable. There are no gains from using this approach except for simplicity at the cost of stability, performance and flexibility.
Currently with raw devices, I am guessing it would be something like that: If we have 4 nvidia devices on opencl platform 0, and 4 amd devices on platform 1, amd devices indexes will be 4-7?
With PCIbus, for some reason Windows may return incorrect data. I am detecting it using PowerShell Get-PnpDevice/Get-PnpDeviceProperty.
Raw device list: No. Nvidia and Intel devices will be completely ignored. All platforms are listed just for reference. Currently, if platform is not "Advanced Micro Devices", it will be skipped. Miner detects only AMD GPUs, so in your case indices will start from 0, not 4.
Adding other vendors at current stage will introduce an additional complexity. For PCIeBusId version it will require CL_DEVICE_PCI_BUS_ID_NV support, and i am unable to test this case properly to provide a reliable solution, so it is hardcoded to AMD.
Excellent, this simplifies my work with AMD devices. I will just use the raw devices to configure it
Great work on the miner, I see a significant improvement on RX480 (with Uber3.1 memory timings) compared to current best miner (MkxMiner), from ~30Mh/s to ~36Mh/s
I would very much like to integrate the miner in https://github.com/yuzi-co/Forager/ but the first 2 issues are kind of blockers for the integration. For the 3rd one I have a solution, but it's sub optimal since it basically reads the miner output to detect current HashRate
edit