Skip to content

Commit

Permalink
Merge pull request #216 from CabbageSong/master
Browse files Browse the repository at this point in the history
Fix a potential issue when using multiple AMDGPUs.
  • Loading branch information
Syllo authored Jun 11, 2023
2 parents 04721e3 + 3e9ddef commit 4fdf2f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extract_gpuinfo_amdgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static bool gpuinfo_amdgpu_get_device_handles(struct list_head *devices, unsigne
gpu_infos[amdgpu_count].fd = fd;
gpu_infos[amdgpu_count].base.vendor = &gpu_vendor_amdgpu;

snprintf(gpu_infos[*count].base.pdev, PDEV_LEN - 1, "%04x:%02x:%02x.%d", devs[i]->businfo.pci->domain,
snprintf(gpu_infos[amdgpu_count].base.pdev, PDEV_LEN - 1, "%04x:%02x:%02x.%d", devs[i]->businfo.pci->domain,
devs[i]->businfo.pci->bus, devs[i]->businfo.pci->dev, devs[i]->businfo.pci->func);
initDeviceSysfsPaths(&gpu_infos[amdgpu_count]);
list_add_tail(&gpu_infos[amdgpu_count].base.list, devices);
Expand Down

0 comments on commit 4fdf2f0

Please sign in to comment.