GPU Kernel Mapping to CPU Cores via Workgroup Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current systems lack efficient methods for utilizing CPU capabilities for executing functions typically processed on GPUs, limiting the flexibility and efficiency of code deployment across different processors in heterogeneous computing environments.

Innovation Solution

The method involves grouping GPU kernel threads into workgroups and assigning them to CPU processor cores, mapping GPU memory hierarchies to CPU memory, and using an automatic address translation mechanism to enable CPU execution, allowing for synchronization and restart of threads at specific points.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If GPU kernels are executed on CPU, then code portability and debugging capability are improved, but system complexity increases due to memory hierarchy mapping and address translation requirements

Engineering Contradiction:
Improvecode portabilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces an address translation mechanism as an intermediary layer between GPU kernel code and CPU memory architecture. This mediator automatically translates GPU memory addresses to CPU-compatible addresses, enabling code portability while managing the complexity of different memory hierarchies behind the scenes.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system creates a universal execution environment where GPU kernel code can run on both GPU and CPU architectures. By implementing memory mapping and address translation, the same kernel code becomes universally executable across different processor types, improving adaptability while abstracting away architectural differences.

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

2Productivity

If workgroups are assigned to different CPU cores, then parallel processing capability is improved, but synchronization overhead increases

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the kernel execution into workgroups that can be independently assigned to different CPU cores. This segmentation enables parallel processing of different data subsets across multiple cores, improving productivity while allowing controlled synchronization at workgroup boundaries.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements periodic synchronization points where workgroups pause and coordinate their progress. This periodic action allows parallel execution to proceed efficiently with minimal synchronization overhead, only interrupting parallel flow when necessary for coordination.

Inventive Principle:
Principle #19Periodic action

3Adaptability or versatility

If memory hierarchy is mapped to CPU memory, then execution flexibility is improved, but address translation overhead increases

Engineering Contradiction:
Improveexecution flexibilityVSAvoidaddress translation overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent performs preliminary memory mapping operations during kernel launch, pre-establishing the relationship between GPU memory addresses and CPU memory locations. This preliminary action reduces the overhead during actual execution by having translation mappings ready in advance rather than computing them in real-time.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP2460073B8Mapping processing logic having data parallel threads across processors
Publication Date: 2018.05.16 ADVANCED MICRO DEVICES INC

AI summary

A method for executing a plurality of data-parallel threads of a processing logic on a processor core includes grouping the plurality of data-parallel threads into one or more workgroups, associating a first workgroup from the one or more workgroups with an operating system thread on the processor core, and configuring threads from the first workgroup as user-level threads within the operating system thread. In an example, a method enables the execution of GPU-kernels that has been previously configured for a GPU, to execute on a CPU such as a multi-core CPU. The mapping of the numerous data-parallel threads to the CPU is done in such a manner as to reduce the number of costly operating system threads instantiated on the CPU, and to enable efficient debugging.