Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsmi: fix the PCI locality of partitioned devices #701

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

bgoglin
Copy link
Contributor

@bgoglin bgoglin commented Dec 13, 2024

rsmi_dev_pci_id_get() returns the GPU "partition ID" inside the PCI BDF function, but this virtual function isn't actually exposed to the OS. See ROCm/rocm_smi_lib#208 for details.

When hwloc fails to find the corresponding PCI device, if the BDF function is > 0, get the RSMI partition ID, compare it with the BDF function, and try to get the PCI device with func = 0 instead.

Thanks to Edgar Leon for reporting the issue.

rsmi_dev_pci_id_get() returns the GPU "partition ID" inside the PCI BDF function,
but this virtual function isn't actually exposed to the OS.
See ROCm/rocm_smi_lib#208 for details.

When hwloc fails to find the corresponding PCI device (usually gets the above bridge instead),
if the BDF function is > 0, get the RSMI partition ID, compare it with the BDF function,
and try to get the PCI device with func = 0 instead.

rsmi_dev_partition_id_get() was only added in ROCm 6.2, so configure-check it.

Thanks to Edgar Leon for reporting and debugging the issue.

Signed-off-by: Brice Goglin <[email protected]>
@bgoglin bgoglin merged commit 6148d4e into open-mpi:master Jan 10, 2025
1 check was pending
@bgoglin bgoglin deleted the rsmi-partition branch January 10, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant