On any OS, you simply call cudaSetDevice to decide on which device to execute CUDA code. The cuda framework does not use all GPUs for you, a programmer has to specifically code to use mroe than one graphics card.
By default (or, by experience anyway) the CUDA context will be initialized on the device that does not have a device attached to it.
Thanks for the response; my OS seems to be grabbing the first device it sees for the display, even with the display plugged into the next device. But the first device is where I want CUDA to run exclusively. Unfortunately I can’t swap the cards’ slots or I would cut the CPU lanes available to the first device.
Any advice along the lines of the older link I posted? I want to explicitly set which card Xorg (or whatever Ubuntu is using in version 16.04) should use.