Runtime ABI Cross-Compiler for GPU Binary Compatibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Different graphics processing unit (GPU) architectures have distinct instruction set architectures (ISAs) and application binary interfaces (ABIs), leading to binary incompatibility issues where programs compiled for one GPU cannot run on another without modification, due to architectural differences such as VLIW and SIMD ISAs.
Innovation Solution
A computing device with a second GPU and processor that executes a run-time executable cross-compiler to translate and emulate the first ABI on the second GPU, allowing GPU-executed programs to run by translating instructions and emulating the first ABI using the second GPU's hardware resources, ensuring compatibility and execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If GPU programs are compiled for a specific GPU architecture with a specific ABI, then execution efficiency and compatibility on that architecture is improved, but binary incompatibility occurs when running on different GPU architectures
Solution Approach 1:
The patent introduces an ABI emulation layer as an intermediary between the second GPU's native ABI and the first GPU's target ABI. This emulation layer translates ABI-specific operations, data layouts, and calling conventions, allowing programs compiled for the first GPU architecture to execute on the second GPU without recompilation, thus resolving the binary incompatibility issue while maintaining adaptability across different GPU architectures
Solution Approach 2:
The patent dynamically adjusts ABI parameters such as data alignment, register allocation, and memory layout during runtime based on the target GPU architecture. By changing these ABI parameters through the emulation layer, the system maintains binary compatibility with programs compiled for the original architecture while adapting to the hardware characteristics of the different GPU architecture
2Adaptability or versatility
If a cross-compiler is used to translate between different ABIs, then cross-architecture compatibility is improved, but translation overhead and execution time increase
Solution Approach 1:
The patent performs preliminary ABI translation during program loading or initialization phase, preparing translation tables and mapping structures before actual program execution. This preliminary action pre-computes the translation requirements based on the target ABI, reducing the translation overhead during runtime execution by having the translation infrastructure ready in advance
Solution Approach 2:
The ABI emulation layer is designed to operate continuously during program execution, with translation operations integrated into the normal execution flow rather than as separate batch operations. This allows the translation process to proceed concurrently with program execution, minimizing idle time and maintaining continuous useful action throughout the runtime
3Speed
If ABI emulation is implemented using hardware resources, then translation speed is improved, but hardware resource consumption increases
Solution Approach 1:
The patent segments the ABI emulation functionality into distinct modular components that can be selectively activated based on the specific ABI translation requirements. By dividing the emulation layer into separate functional units (e.g., data layout conversion, register mapping, memory management), the system can enable only the necessary segments for a given translation task, reducing overall hardware resource consumption while maintaining high translation speed for the required operations
Data Source
AI summary
A computing device for just-in-time cross-compiling compiled binaries of application programs that utilize graphics processing unit (GPU) executed programs configured to be executed on a first GPU having a first application binary interface (ABI) including a second GPU having a second ABI different from the first ABI of the first GPU, and a processor configured to execute an application program that utilizes a plurality of GPU-executed programs configured to be executed for the first ABI of the first GPU, execute a run-time executable cross-compiler configured to, while the application program is being executed, emulate the first ABI using hardware resources of the second GPU by translating between the first ABI and the second ABI, and execute the plurality of GPU-executed programs on the second GPU with the emulated first ABI, and pass output of the plurality of GPU-executed programs for the emulated first ABI through the second ABI.


