mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Make sure to set virtual adapters if --dev-reorder is not enabled or device numbers don't match.
This commit is contained in:
parent
ba74fe5660
commit
c9404f4d11
12
adl.c
12
adl.c
@ -264,13 +264,15 @@ void init_adl(int nDevs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_reorder && devs_match && devices == nDevs) {
|
if (devs_match && devices == nDevs) {
|
||||||
/* Windows has some kind of random ordering for bus number IDs and
|
/* Windows has some kind of random ordering for bus number IDs and
|
||||||
* ordering the GPUs according to ascending order fixes it. Linux
|
* ordering the GPUs according to ascending order fixes it. Linux
|
||||||
* has usually sequential but decreasing order instead! */
|
* has usually sequential but decreasing order instead! */
|
||||||
for (i = 0; i < devices; i++) {
|
for (i = 0; i < devices; i++) {
|
||||||
int j, virtual_gpu = 0;
|
int j, virtual_gpu;
|
||||||
|
|
||||||
|
if (opt_reorder) {
|
||||||
|
virtual_gpu = 0;
|
||||||
for (j = 0; j < devices; j++) {
|
for (j = 0; j < devices; j++) {
|
||||||
if (i == j)
|
if (i == j)
|
||||||
continue;
|
continue;
|
||||||
@ -284,6 +286,8 @@ void init_adl(int nDevs)
|
|||||||
if (virtual_gpu != i)
|
if (virtual_gpu != i)
|
||||||
applog(LOG_INFO, "Mapping device %d to GPU %d according to Bus Number order",
|
applog(LOG_INFO, "Mapping device %d to GPU %d according to Bus Number order",
|
||||||
i, virtual_gpu);
|
i, virtual_gpu);
|
||||||
|
} else
|
||||||
|
virtual_gpu = i;
|
||||||
vadapters[virtual_gpu].virtual_gpu = i;
|
vadapters[virtual_gpu].virtual_gpu = i;
|
||||||
vadapters[virtual_gpu].id = adapters[i].id;
|
vadapters[virtual_gpu].id = adapters[i].id;
|
||||||
}
|
}
|
||||||
@ -294,6 +298,10 @@ void init_adl(int nDevs)
|
|||||||
}
|
}
|
||||||
applog(LOG_ERR, "WARNING: Number of OpenCL and ADL devices does not match!");
|
applog(LOG_ERR, "WARNING: Number of OpenCL and ADL devices does not match!");
|
||||||
applog(LOG_ERR, "Hardware monitoring may NOT match up with devices!");
|
applog(LOG_ERR, "Hardware monitoring may NOT match up with devices!");
|
||||||
|
for (i = 0; i < devices; i++) {
|
||||||
|
vadapters[i].virtual_gpu = i;
|
||||||
|
vadapters[i].id = adapters[i].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (gpu = 0; gpu < devices; gpu++) {
|
for (gpu = 0; gpu < devices; gpu++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user