Shared Virtual Memory Model for CPU-GPU Platforms
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current CPU-GPU platforms face challenges in providing a uniform programming model for integrated and discrete devices, managing shared memory efficiently across different operating systems, and enabling seamless data sharing between CPUs and GPUs, especially in heterogeneous configurations with different instruction sets and operating systems.
Innovation Solution
A shared memory model is introduced that allows for a uniform programming environment across CPU-GPU platforms, enabling data structures and pointers to be shared freely between CPUs and GPUs without marshalling, and leveraging the PCI aperture for efficient data transfer, while supporting user-level communication and ownership rights for coherence optimization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If different operating systems are used on CPU and GPU, then each processor can be optimized for its specific workload, but memory translation schemes become different and the same virtual address maps to different physical addresses
Solution Approach 1:
A translation layer is introduced that intercepts memory access requests from the GPU, translates GPU virtual addresses to CPU physical addresses, and manages the mapping relationships. This intermediary component resolves the incompatibility between different memory translation schemes while allowing each processor to maintain its own operating system and address space management.
2Productivity
If data is shared between CPU and GPU memory spaces, then parallel processing efficiency improves, but memory coherence and access consistency become difficult to maintain
Solution Approach 1:
The system implements feedback mechanisms where the translation layer monitors memory access patterns, tracks which memory regions are shared between CPU and GPU, and dynamically adjusts translation mappings to maintain coherence. This feedback loop ensures that when one processor modifies shared data, the other processor receives updated information, maintaining consistency while enabling efficient parallel processing.
3Ease of operation
If a uniform programming model is implemented across CPU-GPU platforms, then ease of programming improves, but supporting heterogeneous configurations with different ISAs and operating systems becomes more complex
Solution Approach 1:
The translation layer is designed as a universal component that handles multiple functions: address translation between different address spaces, memory allocation across heterogeneous devices, coherence management, and configuration adaptation. This single multi-functional layer provides a uniform programming interface while internally managing the complexity of supporting various CPU-GPU configurations with different ISAs and operating systems.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of the invention provide a programming model for CPU-GPU platforms. In particular, embodiments of the invention provide a uniform programming model for both integrated and discrete devices. The model also works uniformly for multiple GPU cards and hybrid GPU systems (discrete and integrated). This allows software vendors to write a single application stack and target it to all the different platforms. Additionally, embodiments of the invention provide a shared memory model between the CPU and GPU. Instead of sharing the entire virtual address space, only a part of the virtual address space needs to be shared. This allows efficient implementation in both discrete and integrated settings.