GPU Kernel Launch via Compiler API Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional solutions for launching kernels on graphics processing units (GPUs) require transferring significant data between GPU and CPU, making it expensive and limiting the ability to perform iterative tasks and irregular computations, such as recursive algorithms, due to the lack of direct kernel launch capability from GPU code.

Innovation Solution

The solution enables compiler support for launching kernels directly on a GPU by mapping kernel launch syntax to API calls, reducing the number of API calls required and checking for access to private resources, allowing for iterative applications and correct resource management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If kernel launch involves transferring data from host memory to GPU memory, then kernel can be launched from host, but data transfer cost increases significantly

Engineering Contradiction:
Improvekernel launch capabilityVSAvoiddata transfer cost
Core Design Contradiction:
Ease of operationVSLoss of energy

Solution Approach 1:

The patent introduces device-side kernel launch mechanisms that act as intermediaries, allowing kernels to be launched from device code without requiring repeated data transfers from host memory. The device can maintain its own execution context and launch kernels using locally available data, eliminating the need for expensive host-to-device data transfers for each kernel launch.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If conventional host-based kernel launch is used, then kernel can be launched from host, but iterative applications become difficult to implement

Engineering Contradiction:
Improvekernel launch capabilityVSAvoiditerative application capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent enables dynamic kernel launch capabilities from device code, allowing the GPU to dynamically select and launch different kernels based on runtime conditions. This dynamic launch mechanism from within device code enables iterative applications and complex control flows that were previously only possible from host code, significantly improving adaptability.

Inventive Principle:
Principle #15Dynamics

3Ease of operation

If conventional host-based kernel launch is used, then kernel can be launched from host, but irregular computation such as recursive algorithms cannot be performed

Engineering Contradiction:
Improvekernel launch capabilityVSAvoidirregular computation capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic kernel launch capabilities that allow recursive and irregular computations directly from device code. The device can launch kernels dynamically based on runtime conditions, enabling recursive algorithms and complex control flows that were previously only possible from host code, significantly improving adaptability.

Inventive Principle:
Principle #15Dynamics

4Reliability

If multiple API calls are used for kernel launch, then kernel can be launched with proper resource management, but the number of API calls increases

Engineering Contradiction:
Improveresource management correctnessVSAvoidnumber of API calls
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges multiple kernel launch API calls into a single unified launch mechanism. By combining resource allocation, parameter passing, and kernel execution into a single API call, the patent reduces the number of API calls required while maintaining proper resource management and memory allocation correctness.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10025643B2System and method for compiler support for kernel launches in device code
Publication Date: 2018.07.17 NVIDIA CORP
  • US10025643B2 patent drawing
  • US10025643B2 patent drawing
  • US10025643B2 patent drawing

AI summary

A system and method for compiling source code (e.g., with a compiler). The method includes accessing a portion of device source code and determining whether the portion of the device source code comprises a piece of work to be launched on a device from the device. The method further includes determining a plurality of application programming interface (API) calls based on the piece of work to be launched on the device and generating compiled code based on the plurality of API calls. The compiled code comprises a first portion operable to execute on a central processing unit (CPU) and a second portion operable to execute on the device (e.g., GPU).