4 ms·
Is there a distinction between shared graphics memory (an ancient and still very common thing) and "unified memory"?
by TillE 6y ago
Is there a distinction between shared graphics memory (an ancient and still very common thing) and "unified memory"?
- masklinn 6y agoYes, they're absolutely nothing alike. Shared memory means the CPU and the GPU share physical memory in different address space, so 512MB RAM with 64MB shared means the CPU gets 448MB and the GPU gets 64, and data has to be copied from one chunk to the other. Unified memory means both CPU and GPU not only share physical memory but share the address space, all memory is accessible to both at the same time. This means that e.g. you can create commands or load data in memory on the CPU then just tell the GPU "your stuff is here" with no copy needed anywhere, and likewise the other way around.
- rrss 6y ago> data has to be copied from one chunk to the other. With iGPUs, it is pretty standard to be able to map "CPU memory" into the GPU's address space and access it directly, without copies. See section 5.7 here: https://software.intel.com/content/dam/develop/public/us/en/documents/compute-architecture-of-intel-processor-graphics-gen8.pdf https://software.intel.com/content/dam/develop/public/us/en/... I don't think Apple has provided enough information to say if the M1 "unified memory" is actually novel or not. Automatic mirroring between CPU and GPU page tables would be pretty novel, but I don't think there's any info currently available to suggest that happens.
- fulafel 6y agoMemory cross addressability/accessibility works with dGPUs too (but there of course accessing memory behind PCIe is slower). IOMMUs are involved. But software/driver stack has been slow to take advantage of iGPU unified memory, operating systems are partly to blame too.