Closed UselessGuru closed 4 years ago
There are many orders in different programs. Our competitor miners used AMD cards then Nvidia cards order. We used to have Nvidia (enumerated by CUDA) then AMD devices. Finally what we and competitors investigated is there is no good order other than PCI address for AMD and Nvidia GPUs.
clGetDeviceInfo
.
So using OpenCL order after PCI order even as an option looks error-prone for me.However I see there is a technical problem which makes proper integration impossible. Can I help implementing PCI order in MultiPoolMiner?
@Grumpy-Dwarf Thank you for your information.
Can I help implementing PCI order in MultiPoolMiner?
Yes sure!
MultiPoolMiner relies entirely on the device order returned by OpenCL, In most cases that matches the PCI device order - but no always (kin my computer it does not)
If you know of a clever way to map the PCI id to the OpenCL id. That's all what's needed. Currently I have implemented an optional 'manual' mapping that re-maps the PCI id's to OpenCL id's:
"DevicePciOrderMapping": {
"GPU#00": "0",
"GPU#01": "1",
"GPU#02": "3",
"GPU#03": "2"
},
Or you know of a way to re-order the device order returned by OpenCL.
Platforms order is tricky.
MPM can deal with this. This is what MPM currently uses (mostly retrieved trough OpenCL, except for the PCIBus_* entries which I add by using the DevicePciOrderMapping information):
[
{
"Index": 0,
"PlatformId": 0,
"PlatformId_Index": 0,
"Type_PlatformId_Index": 0,
"Vendor": "NVIDIA Corporation",
"Vendor_ShortName": "NVIDIA",
"Vendor_Index": 0,
"Type_Vendor_Index": 0,
"Type": "Gpu",
"Type_Index": 0,
"OpenCL": {
"AddressBits": 64,
"Available": true,
"CompilerAvailable": true,
"DoubleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma",
"EndianLittle": true,
"ErrorCorrectionSupport": false,
"ExecCapabilities": "ExecKernel",
"Extensions": "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer",
"GlobalMemCacheSize": 458752,
"GlobalMemCacheType": 2,
"GlobalMemCachelineSize": 128,
"GlobalMemSize": 11811160064,
"ImageSupport": true,
"LocalMemSize": 49152,
"LocalMemType": 1,
"MaxClockFrequency": 1607,
"MaxComputeUnits": 28,
"MaxConstantArgs": 9,
"MaxConstantBufferSize": null,
"MaxMemAllocSize": 2952790016,
"MaxParameterSize": 4352,
"MaxReadImageArgs": 256,
"MaxSamplers": 32,
"MaxWorkGroupSize": 1024,
"MaxWorkItemDimensions": 3,
"MaxWorkItemSizes": "1024 1024 64",
"MaxWriteImageArgs": 16,
"MemBaseAddrAlign": 4096,
"MinDataTypeAlignSize": 128,
"Name": "GeForce GTX 1080 Ti",
"ClVersion": "OpenCL C 1.2 ",
"Platform": "@{Profile=FULL_PROFILE; Version=OpenCL 1.2 CUDA 10.2.120; Name=NVIDIA CUDA; Vendor=NVIDIA Corporation; Extensions=System.Object[]}",
"PreferredVectorWidthChar": 1,
"PreferredVectorWidthShort": 1,
"PreferredVectorWidthInt": 1,
"PreferredVectorWidthLong": 1,
"PreferredVectorWidthFloat": 1,
"PreferredVectorWidthDouble": 1,
"Profile": "FULL_PROFILE",
"QueueProperties": "OutOfOrderExecModeEnable, ProfilingEnable",
"SingleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma, FpCorrectlyRoundedDivideSqrt",
"Type": "Gpu",
"Vendor": "NVIDIA Corporation",
"VendorId": 4318,
"Version": "OpenCL 1.2 CUDA",
"DriverVersion": "430.86"
},
"Model": "GeForce GTX 1080 Ti",
"Model_Norm": "GTX1080Ti",
"PCIBus_Index": 0,
"PCIBus_Type_Index": 0,
"PCIBus_Type_PlatformId_Index": 0,
"PCIBus_Type_Vendor_Index": 0,
"PCIBus_Vendor_Index": 0,
"Name": "GPU#00",
"Status": "Running (NVIDIA-CryptoDredge_v0.20.1 [Argon2UIS])"
},
{
"Index": 1,
"PlatformId": 0,
"PlatformId_Index": 1,
"Type_PlatformId_Index": 1,
"Vendor": "NVIDIA Corporation",
"Vendor_ShortName": "NVIDIA",
"Vendor_Index": 1,
"Type_Vendor_Index": 1,
"Type": "Gpu",
"Type_Index": 1,
"OpenCL": {
"AddressBits": 64,
"Available": true,
"CompilerAvailable": true,
"DoubleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma",
"EndianLittle": true,
"ErrorCorrectionSupport": false,
"ExecCapabilities": "ExecKernel",
"Extensions": "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer",
"GlobalMemCacheSize": 163840,
"GlobalMemCacheType": 2,
"GlobalMemCachelineSize": 128,
"GlobalMemSize": 6442450944,
"ImageSupport": true,
"LocalMemSize": 49152,
"LocalMemType": 1,
"MaxClockFrequency": 1784,
"MaxComputeUnits": 10,
"MaxConstantArgs": 9,
"MaxConstantBufferSize": null,
"MaxMemAllocSize": 1610612736,
"MaxParameterSize": 4352,
"MaxReadImageArgs": 256,
"MaxSamplers": 32,
"MaxWorkGroupSize": 1024,
"MaxWorkItemDimensions": 3,
"MaxWorkItemSizes": "1024 1024 64",
"MaxWriteImageArgs": 16,
"MemBaseAddrAlign": 4096,
"MinDataTypeAlignSize": 128,
"Name": "GeForce GTX 1060 6GB",
"ClVersion": "OpenCL C 1.2 ",
"Platform": "@{Profile=FULL_PROFILE; Version=OpenCL 1.2 CUDA 10.2.120; Name=NVIDIA CUDA; Vendor=NVIDIA Corporation; Extensions=System.Object[]}",
"PreferredVectorWidthChar": 1,
"PreferredVectorWidthShort": 1,
"PreferredVectorWidthInt": 1,
"PreferredVectorWidthLong": 1,
"PreferredVectorWidthFloat": 1,
"PreferredVectorWidthDouble": 1,
"Profile": "FULL_PROFILE",
"QueueProperties": "OutOfOrderExecModeEnable, ProfilingEnable",
"SingleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma, FpCorrectlyRoundedDivideSqrt",
"Type": "Gpu",
"Vendor": "NVIDIA Corporation",
"VendorId": 4318,
"Version": "OpenCL 1.2 CUDA",
"DriverVersion": "430.86"
},
"Model": "GeForce GTX 1060 6GB",
"Model_Norm": "GTX10606GB",
"PCIBus_Index": 1,
"PCIBus_Type_Index": 1,
"PCIBus_Type_PlatformId_Index": 1,
"PCIBus_Type_Vendor_Index": 1,
"PCIBus_Vendor_Index": 1,
"Name": "GPU#01",
"Status": "Running (NVIDIA-CryptoDredge_v0.20.1 [Argon2UIS])"
},
{
"Index": 2,
"PlatformId": 1,
"PlatformId_Index": 0,
"Type_PlatformId_Index": 0,
"Vendor": "Advanced Micro Devices, Inc.",
"Vendor_ShortName": "AMD",
"Vendor_Index": 0,
"Type_Vendor_Index": 0,
"Type": "Gpu",
"Type_Index": 2,
"OpenCL": {
"AddressBits": 64,
"Available": true,
"CompilerAvailable": true,
"DoubleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma",
"EndianLittle": true,
"ErrorCorrectionSupport": false,
"ExecCapabilities": "ExecKernel",
"Extensions": "cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_planar_yuv",
"GlobalMemCacheSize": 16384,
"GlobalMemCacheType": 2,
"GlobalMemCachelineSize": 64,
"GlobalMemSize": 8589934592,
"ImageSupport": true,
"LocalMemSize": 32768,
"LocalMemType": 1,
"MaxClockFrequency": 1325,
"MaxComputeUnits": 36,
"MaxConstantArgs": 8,
"MaxConstantBufferSize": null,
"MaxMemAllocSize": 4244635648,
"MaxParameterSize": 1024,
"MaxReadImageArgs": 128,
"MaxSamplers": 16,
"MaxWorkGroupSize": 1024,
"MaxWorkItemDimensions": 3,
"MaxWorkItemSizes": "1024 1024 1024",
"MaxWriteImageArgs": 64,
"MemBaseAddrAlign": 2048,
"MinDataTypeAlignSize": 128,
"Name": "Ellesmere",
"ClVersion": "OpenCL C 2.0 ",
"Platform": "@{Profile=FULL_PROFILE; Version=OpenCL 2.1 AMD-APP (2841.19); Name=AMD Accelerated Parallel Processing; Vendor=Advanced Micro Devices, Inc.; Extensions=System.Object[]}",
"PreferredVectorWidthChar": 4,
"PreferredVectorWidthShort": 2,
"PreferredVectorWidthInt": 1,
"PreferredVectorWidthLong": 1,
"PreferredVectorWidthFloat": 1,
"PreferredVectorWidthDouble": 1,
"Profile": "FULL_PROFILE",
"QueueProperties": "ProfilingEnable",
"SingleFpConfig": "FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma, FpCorrectlyRoundedDivideSqrt",
"Type": "Gpu",
"Vendor": "Advanced Micro Devices, Inc.",
"VendorId": 4098,
"Version": "OpenCL 2.0 AMD-APP (2841.19)",
"DriverVersion": "2841.19"
},
"Model": "Ellesmere8GB",
"Model_Norm": "Ellesmere8GB",
"PCIBus_Index": 3,
"PCIBus_Type_Index": 3,
"PCIBus_Type_PlatformId_Index": 1,
"PCIBus_Type_Vendor_Index": 1,
"PCIBus_Vendor_Index": 1,
"Name": "GPU#02",
"Status": "Running (AMD_NVIDIA-ClaymoreEthash_v14.7 [Ethash])"
},
{
"Index": 3,
"PlatformId": 1,
"PlatformId_Index": 1,
"Type_PlatformId_Index": 1,
"Vendor": "Advanced Micro Devices, Inc.",
"Vendor_ShortName": "AMD",
"Vendor_Index": 1,
"Type_Vendor_Index": 1,
"Type": "Gpu",
"Type_Index": 3,
"OpenCL": {
"AddressBits": 64,
"Available": true,
"CompilerAvailable": true,
"DoubleFpConfig": "FpDenorm, FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma",
"EndianLittle": true,
"ErrorCorrectionSupport": false,
"ExecCapabilities": "ExecKernel",
"Extensions": "cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_liquid_flash cl_amd_planar_yuv",
"GlobalMemCacheSize": 16384,
"GlobalMemCacheType": 2,
"GlobalMemCachelineSize": 64,
"GlobalMemSize": 2147483648,
"ImageSupport": true,
"LocalMemSize": 32768,
"LocalMemType": 1,
"MaxClockFrequency": 1300,
"MaxComputeUnits": 16,
"MaxConstantArgs": 8,
"MaxConstantBufferSize": null,
"MaxMemAllocSize": 1879048192,
"MaxParameterSize": 1024,
"MaxReadImageArgs": 128,
"MaxSamplers": 16,
"MaxWorkGroupSize": 1024,
"MaxWorkItemDimensions": 3,
"MaxWorkItemSizes": "1024 1024 1024",
"MaxWriteImageArgs": 64,
"MemBaseAddrAlign": 2048,
"MinDataTypeAlignSize": 128,
"Name": "Baffin",
"ClVersion": "OpenCL C 2.0 ",
"Platform": "@{Profile=FULL_PROFILE; Version=OpenCL 2.1 AMD-APP (2841.19); Name=AMD Accelerated Parallel Processing; Vendor=Advanced Micro Devices, Inc.; Extensions=System.Object[]}",
"PreferredVectorWidthChar": 4,
"PreferredVectorWidthShort": 2,
"PreferredVectorWidthInt": 1,
"PreferredVectorWidthLong": 1,
"PreferredVectorWidthFloat": 1,
"PreferredVectorWidthDouble": 1,
"Profile": "FULL_PROFILE",
"QueueProperties": "ProfilingEnable",
"SingleFpConfig": "FpInfNan, FpRoundToNearest, FpRoundToZero, FpRoundToInf, FpFma, FpCorrectlyRoundedDivideSqrt",
"Type": "Gpu",
"Vendor": "Advanced Micro Devices, Inc.",
"VendorId": 4098,
"Version": "OpenCL 2.0 AMD-APP (2841.19)",
"DriverVersion": "2841.19"
},
"Model": "Baffin2GB",
"Model_Norm": "Baffin2GB",
"PCIBus_Index": 2,
"PCIBus_Type_Index": 2,
"PCIBus_Type_PlatformId_Index": 0,
"PCIBus_Type_Vendor_Index": 0,
"PCIBus_Vendor_Index": 0,
"Name": "GPU#03",
"Status": "Disabled"
},
{
"Index": 4,
"Vendor": "GenuineIntel",
"Vendor_ShortName": "INTEL",
"Type_Vendor_Index": 0,
"Type": "Cpu",
"Type_Index": 0,
"CIM": {
"CimClass": "@{CimSuperClassName=CIM_Processor; CimSuperClass=; CimClassProperties=System.Object[]; CimClassQualifiers=System.Object[]; CimClassMethods=System.Object[]; CimSystemProperties=}",
"CimInstanceProperties": " ",
"CimSystemProperties": "@{Namespace=root/cimv2; ServerName=BLACKBOX; ClassName=Win32_Processor; Path=}",
"Caption": "Intel64 Family 6 Model 158 Stepping 10",
"Description": "Intel64 Family 6 Model 158 Stepping 10",
"InstallDate": null,
"Name": "Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz",
"Status": "OK",
"Availability": 3,
"ConfigManagerErrorCode": null,
"ConfigManagerUserConfig": null,
"CreationClassName": "Win32_Processor",
"DeviceID": "CPU0",
"ErrorCleared": null,
"ErrorDescription": null,
"LastErrorCode": null,
"PNPDeviceID": null,
"PowerManagementCapabilities": null,
"PowerManagementSupported": false,
"StatusInfo": 3,
"SystemCreationClassName": "Win32_ComputerSystem",
"SystemName": "BLACKBOX",
"AddressWidth": 64,
"CurrentClockSpeed": 3600,
"DataWidth": 64,
"Family": 205,
"LoadPercentage": null,
"MaxClockSpeed": 3600,
"OtherFamilyDescription": null,
"Role": "CPU",
"Stepping": null,
"UniqueId": null,
"UpgradeMethod": 50,
"Architecture": 9,
"AssetTag": "To Be Filled By O.E.M.",
"Characteristics": 236,
"CpuStatus": 1,
"CurrentVoltage": 12,
"ExtClock": 100,
"L2CacheSize": 1536,
"L2CacheSpeed": null,
"L3CacheSize": 9216,
"L3CacheSpeed": 0,
"Level": 6,
"Manufacturer": "GenuineIntel",
"NumberOfCores": 6,
"NumberOfEnabledCore": 6,
"NumberOfLogicalProcessors": 6,
"PartNumber": "To Be Filled By O.E.M.",
"ProcessorId": "BFEBFBFF000906EA",
"ProcessorType": 3,
"Revision": null,
"SecondLevelAddressTranslationExtensions": false,
"SerialNumber": "To Be Filled By O.E.M.",
"SocketDesignation": "U3E1",
"ThreadCount": 6,
"Version": "",
"VirtualizationFirmwareEnabled": false,
"VMMonitorModeExtensions": false,
"VoltageCaps": null,
"PSComputerName": null
},
"Model": "Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz",
"Model_Norm": "GenuineIntel6CoreCPU",
"CpuFeatures": [
"ABM",
"ADX",
"AES",
"AVX",
"AVX2",
"BMI1",
"BMI2",
"FMA3",
"MMX",
"MPX",
"RDRAND",
"SSE",
"SSE2",
"SSE3",
"SSE41",
"SSE42",
"SSSE3",
"x64"
],
"Name": "CPU#00",
"Status": "Disabled"
}
]
Currently nanominer sorts the devices by PCI busID. Unfortunately the PCI BusID information is not available through the OpenCL API which, as a consequence, breaks proper integration on MultiPoolMiner based software (e.g. MultipoolMiner, Nemos Miner etc.). Could you please add an option (e.g. --deviceOrder OpenCL) which will allow nanominer to sort the devices based on OpenCL device ID?
OpenCL device order in my case is:
Nanominer now:
Preferred result: