Skip to content

Commit 7cff0c7

Browse files
committed
Update blog
1 parent 2ed6578 commit 7cff0c7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/blog/2025-10-27-1761560082.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ This analogy helps me understand the scale and performance penalty for data tran
1818

1919
For e.g. reading constantly from the Global Memory is like driving between the factory and the warehouse outside the city each time (with the traffic of city roads). This is much slower than going to the shed inside the factory (i.e. Shared Memory), and much much slower than just sticking your hand into the tray next to your stamping machine (i.e. Registers). And reading from the Host Memory (CPU) is like taking an overnight trip to another city.
2020

21+
Therefore the job of running a computation graph (like ONNX) efficiently on GPU(s) is like planning the logistics of a manufacturing company. You've got raw materials in one city that you need to ship to potentially different cities, and store and process them across different factories and machines. And you need to make sure that the production process follows the chart laid out in the computation graph. You need to make sure that every machine in each factory is being utilized optimally, and account for the time it takes to move things between cities/factories/machines.
22+
23+
If you're supporting multiple models, then you're dealing with multiple computation graphs. And if you're supporting multiple GPU vendors (NVIDIA, AMD etc), and multiple architectures in each vendor (e.g. 3060, 4080, 5080 etc), then you're dealing with multiple factory configurations.
24+
25+
You can analyze the computation graph ahead-of-time (AOT) and perform some obvious optimizations like fusing operations etc. And you can take the factory configuration (GPU specs) into account and plan the task division and schedule.
26+
27+
But it might also make sense to have a "realtime" supervisor. This supervisor would get realtime information about how things are actually going, and would adjust the task division and layout in real time. Maybe even change the compiled graph in realtime.
28+
2129
Notes:
2230
1. Apple Silicon and Mobile devices use a concept of "unified memory", so they don't have an overnight trip between cities. You can think of Apple Silicon as neighboring cities that almost overlap, like twin cities in some countries.
2331
2. Mobile devices usually don't have a concept of shared memory, so their factories don't have warehouse sheds.

0 commit comments

Comments
 (0)