Skip to content

Commit

Permalink
Fix checking IDs for non-GPU devices
Browse files Browse the repository at this point in the history
  • Loading branch information
eleon committed Jun 14, 2023
1 parent 8a45b35 commit 171e62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internals.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ int discover_devices(hwloc_topology_t topo,

/* Make sure VISIBLE_DEVICES id is set,
even when no OpenCL device was found (AMD GPUs) */
if (devs[index]->visdevs == -1) {
if (devs[index]->type == DEV_GPU && devs[index]->visdevs == -1) {
if (devs[index]->smi >= 0)
devs[index]->visdevs = devs[index]->smi;
else
Expand Down

0 comments on commit 171e62d

Please sign in to comment.