Identical GPUs in system, determine which is connected to display

For a Windows system I have noticed that when two identical GPUs are in the system under WDDM driver CUDA usually will label the GPU connected to the display as ‘GPU 0’ and the one not connected to the display as ‘GPU 1’. The problem with this is that typically the GPU connected to the display will be slightly slower for compute (which is also the case for linux) and will hang up use console input while active.
So generally with such systems I just assume that ‘GPU 1’ is the compute ‘display free’ GPU and set the device to 1. If the GPUs are unequal or one is using the TCC mode driver then that GPU gets the default’ GPU 0’ designation.

But for a customer with a Windows system with two of the same GPUs in WDDM I would like to be able to query which of the two is connected to the display and get back the CUDA numbering of that GPU so for single GPU tasks I can use the slightly faster GPU without affecting the console input/output.

I looked to see if I could query via cudaGetDeviceProperties(&deviceProp, deviceNum); but did not see a value which is related to which GPU is connected to the display.

Is this possible to query? If so how?

Also can I assume that in Windows OS with two identical GPUs (WDDM) in the system that CUDA will always choose the one connected to the display as ‘GPU 0’? If not then what else could affect this numbering for CUDA?