Multi-Architecture Co-Processor Code Compilation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern computer systems face long compile times for co-processor enabled application programs due to increased complexity, leading to unacceptably protracted start-up times and lack of forward compatibility with new GPU architectures.

Innovation Solution

A method is introduced that compiles and links device source code into virtual assembly code, which is then translated into machine code for specific co-processor architectures, allowing the application program to store both forms within the application and use a driver to select the appropriate code for execution, ensuring compatibility with multiple architectures without recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If pre-compiled GPU machine code is incorporated into the application program as a code bundle, then application start-up time is reduced, but forward compatibility with new GPU architectures is lost

Engineering Contradiction:
Improveapplication start-up timeVSAvoidforward compatibility
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent divides the code into two segments: a code bundle containing pre-compiled machine code for known GPU architectures, and a just-in-time (JIT) compilation component for handling new architectures. This segmentation allows the system to use pre-compiled code for supported GPUs (fast start-up) while falling back to JIT compilation for new architectures (forward compatibility).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary compilation of GPU code during the application build process, creating a code bundle with pre-compiled machine code for known GPU architectures. This preliminary action eliminates the need for compilation at runtime for supported architectures, achieving fast start-up times while maintaining compatibility through the bundled code.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If source code is compiled using just-in-time (JIT) regime, then forward compatibility with new GPU architectures is maintained, but application start-up time increases due to long compile times

Engineering Contradiction:
Improveforward compatibilityVSAvoidapplication start-up time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies partial compilation strategy by pre-compiling code for known GPU architectures into a code bundle, while reserving JIT compilation only for new architectures that are not yet supported. This partial action approach optimizes performance for the majority of cases (known architectures) while maintaining compatibility for edge cases (new architectures).

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent introduces a code bundle as an intermediary layer between the application and the GPU. This code bundle contains pre-compiled machine code that serves as a cache or lookup table, allowing the system to quickly determine whether pre-compiled code is available for the current GPU architecture before resorting to full JIT compilation.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If a new GPU driver is developed for each new GPU architecture, then compatibility with specific GPU architectures is ensured, but development complexity and time increase

Engineering Contradiction:
Improvearchitecture compatibilityVSAvoiddriver development complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a universal code bundle that can serve multiple GPU architectures simultaneously. Instead of developing separate drivers for each architecture, the system uses a single code bundle containing pre-compiled code for multiple known architectures, reducing driver development complexity while maintaining broad compatibility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent uses code copying by duplicating pre-compiled machine code for different GPU architectures within the same code bundle. This allows the system to share common compilation logic and infrastructure while providing architecture-specific optimizations through copied and adapted code versions.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8347310B1System and method for representing and managing a multi-architecure co-processor application program
Publication Date: 2013.01.01 NVIDIA CORP
  • US8347310B1 patent drawing
  • US8347310B1 patent drawing
  • US8347310B1 patent drawing

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.