AMD engineers are experimenting with a proof-of-concept implementation of a Shared Virtual Memory (SVM) implementation atop the DRM_GPUSVM framework.
The AMD Linux graphics driver already supports Shared Virtual Memory while the drm_gpusvm framework is a newer approach to provide a unified implementation for GPU drivers for handling memory allocation / mapping / migration across CPU and GPU address spaces. Shared Virtual Memory at large is about enjoying a unified address space where the CPU and GPUs/accelerators can access the same memory locations and use the same memory pointers. With the unified drm_gpusvm framework it should be easier to maintain across drivers compared to each driver’s existing (or not) SVM implementation directly atop the likes of Linux’s Heterogeneous Memory Management (HMM). More details on the evolving DRM GPU SVM framework can be found via the kernel.org documentation.
AMD is experimenting with DRM_GPUSVM to validate the framework’s design and allow for discussing the framework’s evolution. This new code is just a basic SVM implementation for now and lacks features like multi-GPU support and other advanced functionality. Even so this basic implementation was enough to pass all ROCR tests and pass a vast majority of the AMDKFD and HIP tests.
DRM_GPUSVM challenges were uncovered in the multi-GPU code paths, no global migration decision logic, no vRAM to vRAM migration, and other technical items. So there’s more work ahead before AMD could potentially adopt using the drm_gpusvm framework for its SVM implementation.
Those curious about the request for comments (RFC) patches can find them on the dri-devel mailing list.
