Affinity Masks for Multi-GPU Work Distribution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-GPU systems, existing technologies lack the ability for software applications to efficiently control which GPUs process specific sets of commands, leading to inefficient work distribution due to the software driver's lack of domain-specific knowledge.
Innovation Solution
A method that involves creating an affinity mask to select specific GPUs for processing, generating an affinity device context, and establishing an affinity rendering context, allowing the software application to direct work to the selected GPUs, thereby enabling domain-specific control over GPU allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the software driver distributes work among multiple GPUs, then the system can utilize multi-GPU processing capability, but the work distribution is inefficient because the driver lacks domain-specific knowledge
Solution Approach 1:
The patent introduces an affinity mask as an intermediary data structure that mediates between the application's domain-specific knowledge and the driver's work distribution decisions. The affinity mask serves as a communication bridge, allowing the application to specify GPU preferences without requiring the driver to understand domain-specific requirements. This resolves the contradiction by enabling efficient work distribution through the mask-based intermediary rather than direct driver control.
Solution Approach 2:
The patent applies preliminary action by having the application pre-configure the affinity mask before work distribution occurs. The affinity mask is set up in advance with domain-specific knowledge about which GPUs should handle specific types of work, allowing the driver to subsequently distribute work efficiently based on this pre-established configuration rather than making suboptimal real-time decisions.
2Adaptability or versatility
If the application directly controls GPU selection, then domain-specific work allocation can be achieved, but existing API models would need to be modified
Solution Approach 1:
The patent applies universality by designing the affinity mask mechanism to work across multiple existing API models without requiring modifications to each API. The affinity mask is a universal data structure that can be integrated into different graphics APIs while maintaining their existing functionality. This allows the application to control GPU selection flexibly across different APIs without increasing overall system complexity or requiring API model changes.
3Adaptability or versatility
If conventional APIs are used without affinity masks, then API compatibility is maintained, but applications cannot control which GPUs process specific commands
Solution Approach 1:
The patent applies the nested doll principle by embedding the affinity mask concept within the existing API framework. The affinity mask is nested as an additional parameter or data structure within the conventional API calls, allowing it to carry domain-specific information without disrupting the outer API structure. This enables applications to control GPU assignment while maintaining API compatibility, as the affinity mask is nested within the existing API interface rather than replacing it.
Data Source
AI summary
One embodiment of the present invention sets forth a set of application programming interface (API) extensions that enable a software application to control the processing work assigned to each GPU in a multi-GPU system. The software application enumerates a list of available GPUs, sets an affinity mask from the enumerated list of GPUs and generates an affinity device context associated with the affinity mask. The software application can then generate and utilize an affinity rendering context that directs rendering commands to a set of explicitly selected GPUs, thus allocating work among specifically selected GPUs. The software application is empowered to use domain specific knowledge to better optimize the work assigned to each GPU, thus achieving greater overall processing efficiency relative to the prior art techniques.


