r/eli5_programming • u/OhFuckThatWasDumb • Nov 02 '24
Question How does a computer know to use hardware acceleration units?
How can a computer know that it should execute a program on a gpu, video processor, AI accelerator, or even other cpu cores?
1
Upvotes
2
u/UpsetKoalaBear Nov 02 '24 edited Nov 02 '24
Drivers and API’s.
They are the interface between how the hardware and software communicate. The driver will distribute the task to where it is best suited, and this is why drivers are written by hardware vendors.
There’s some example explanations of this on the Microsoft documentation.
5
u/Glacia Nov 02 '24
The same way everything works in code: You ask for it. There is usually a SDK from manufacturer that allows you to use hardware acceleration.