fix: gpu memory leaks

This commit is contained in:
Siwat Sirichai 2025-11-10 22:10:46 +07:00
parent 3a47920186
commit 593611cdb7
13 changed files with 420 additions and 166 deletions

9
new_buffer_design.txt Normal file
View file

@ -0,0 +1,9 @@
The Post-Decoded Buffer should just be the ping pong ring buffer
let's get some relationship in order
- ping pong ring is per model
- many camera may use the same model
- this buffer is filled when we memcpy it from decode buffer
but I need some more ground rules
- in the model buffer, one frame per camera may be in the buffer, if older one of the same camera exist, evict it. This is a real time system so buffer should be as fresh as possible.
- The goal of batching is not to pool up processing for the same camera but to pool up multiple camera.
- if all camera in the pool already post its frame, flush the buffer too