I don't even know where to start. First, of all, you are talking to the person who has verified the presence of Dynamic Caching on the A17 GPU, so I know a thing or two about it. Second, Dynamic Caching has to do with lazy allocation of on-GPU resources, not system RAM. Third, it is not possible to allocate system RAM from a GPU shader (or if it is possible, Apple does not expose it to the developer, and it would require a round-trip to OS anyway, which is dead slow). You allocate the data buffer in the host application (on the CPU) and pass it to the GPU. So if you think you might need a 2GB scratchpad for your video application, you have to allocate the 2GB scratchpad, there is no way around it, Dynamic Caching or not.
If you want to know more about Dynamic Caching, please read this patent that describes the feature in detail, while also keeping in mind that we don't know how much of the patent Apple has actually implemented (I verified it for the register file usage, but threadgroup memory and stack memory is likely lazily managed as well):
Techniques are disclosed relating to dynamically allocating and mapping private memory for requesting circuitry. Disclosed circuitry may receive a private address and translate the private address to a virtual address (which an MMU may then translate to physical address to actually access a...
patents.google.com