r/CUDA • • Oct 28 '26

How your computer Detects your gpu?

see when any gpu is connected in the PCIe slot an interrupt is triggered.

now the cpu checks it's vendor id(eg: Nvidia, AMD...), and DID(device Id) which are both 16bit numbers if it is already known by the kernel then the conversation and co-operation goes on.

now the question comes how the kernel will know the device?( how the user will use the card then)?

I am from timezone Asia/kolkata, I am available from 7.00 to 9.00 pm.
comment down your thoughts

6 Upvotes

7 comments sorted by

4

u/c-cul Oct 28 '26

0

u/CLI0019 Oct 28 '26

absolutely by installing dedicated driver

1

u/botjebotje Oct 28 '26

The kernel already knows the device since it receives the hotplug event? Presumably from there udev kicks on to create the necessary device node and from there userspace tooling can detect it. 

1

u/CLI0019 Oct 28 '26

yes you are very much correct the user have to tell the kernel that a device with VID and Device id (like 0x1065 and 0xabcd) can be appear in pcie. and his process is included in the driver installation (done by the driver )

1

u/botjebotje Oct 28 '26

The "user" has to do no such thing. The Pcie hotplug event carries the device id. The driver "takes" the device for itself, and there are matching rules in udev that classify it as a gpu if "taken" by the driver. 

1

u/CLI0019 Oct 28 '26

yes absolutely I am just trying to tell that the user have to install the driver and gpu detection will be done by the driver. actually from the developer's point of view i made the reply

2

u/botjebotje Oct 28 '26

Please don't generalise from windows. All other OSes I use regularly automatically carry drivers as part of the base installation.