Multi-Architecture Co-Processor Application Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern GPU architectures face long compile times due to increased computational demands, leading to unacceptably prolonged start-up times for co-processor applications, and existing solutions lack forward compatibility with new GPU devices.
Innovation Solution
A method that compiles and links device source code into virtual assembly code, which is then translated into machine code for specific architectures, allowing the application to select between virtual assembly and machine code based on the current GPU architecture, ensuring compatibility without recompiling for new architectures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If JIT compilation is used for GPU code, then forward compatibility with new GPU architectures is maintained, but application start-up time becomes unacceptably long
Solution Approach 1:
The patent pre-compiles GPU machine code for multiple known GPU architectures at application build time and includes these pre-compiled code bundles within the application package. This preliminary action eliminates the need for JIT compilation at runtime, reducing start-up time while maintaining compatibility through pre-prepared architecture-specific code.
Solution Approach 2:
The patent implements a dynamic code selection mechanism where the GPU driver determines the current GPU architecture type and dynamically selects the appropriate pre-compiled machine code bundle from multiple available versions. This dynamic selection allows the application to adapt to different GPU architectures without recompilation, resolving the contradiction between fast start-up and forward compatibility.
2Loss of time
If pre-compiled GPU machine code bundles are included for every known GPU, then application start-up time is reduced, but forward compatibility with new GPU architectures is lost
Solution Approach 1:
The patent creates a universal code bundle structure that includes multiple versions of GPU machine code targeting different GPU architectures within a single application package. The GPU driver universally supports this structure and can select the appropriate version based on the detected GPU architecture, making the application compatible with both known and future GPU architectures without requiring separate compilation for each.
3Power
If GPU computational throughput and programmability are increased, then computational capability is improved, but compilation time becomes excessively long
Solution Approach 1:
The patent performs the computationally intensive GPU code compilation process at application build time rather than at runtime. By moving the compilation action to build time when computational resources are available and not time-critical, the patent enables complex GPU programs with high computational throughput to be prepared in advance, eliminating long compilation delays during application execution.
Data Source
AI summary
One embodiment of the present invention sets forth a technique for representing and managing a multi-architecture co-processor application program. Source code for co-processor functions is compiled in two stages. The first stage incorporates a majority of the computationally intensive processing steps associated with co-processor code compilation. The first stage generates virtual assembly code from the source code. The second stage generates co-processor machine code from the virtual assembly. Both the virtual assembly and co-processor machine code may be included within the co-processor enabled application program. A co-processor driver uses a description of the currently available co-processor to select between virtual assembly and co-processor machine code. If the virtual assembly code is selected, then the co-processor driver compiles the virtual assembly into machine code for the current co-processor.


