Order of adapters with enumerate_adapters #5442
Replies: 2 comments
-
Only know 1 off the top of my head: it's exactly the order given by the backends, in order of backend preference. All vulkan's adapters, then metals, dx12s, then gls. In that order. |
Beta Was this translation helpful? Give feedback.
-
Thanks!! I think most systems with multiple GPUs are going to be data centers or ML workstations running Linux. So maybe for now we can focus on how to resolve the GPUs identities on just those types of setups, and therefore we can restrict ourself to Vulkan. If there's a way to get Vulkan to list the devices based on the PCIe bus address order we can have the same order in torch and wgpu. |
Beta Was this translation helpful? Give feedback.
-
Somewhat related to #2022
Scenario
In a multi-gpu environment, its common to have a certain number of the same type of GPU. In fact, comparing the adapter properties, the gpu's are indistinguishable from each-other.
One use case is to select one for rendering and the other for work e.g. with PyTorch. Since the names of these GPU's are equal, it makes sense to use their index instead:
Problem
However, for this to work, its crucial that the order reported by wgpu-core (and consequently wgpu-native and wgpupy) to be consistent with the order that pytorch / cuda uses.
Questions
enumerate_adapters()
.Beta Was this translation helpful? Give feedback.
All reactions