GPU Simulation via Virtualization and Binary Translation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

GPU simulation is slower and more complex than CPU simulation due to lack of hardware-assisted virtualization support and limited backward compatibility in GPU instruction design, making it difficult to run new generation GPU instructions on old generation GPUs.

Innovation Solution

A GPU simulation method that uses system virtualization and existing GPU software stacks to improve simulation speed by converting high-level commands into low-level instruction sequences, employing binary translation or existing software stack mechanisms for instruction execution, allowing simulation of different GPU models and versions with reduced complexity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If GPU simulation is performed using traditional software simulation technologies, then the simulation can be achieved, but the simulation speed is very slow

Engineering Contradiction:
Improvesimulation speedVSAvoidsimulation time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent introduces a virtualization layer as an intermediary between the guest OS and physical GPU hardware. The virtual GPU driver and translation mechanisms act as mediators that enable efficient instruction translation and execution, significantly improving simulation speed compared to traditional software simulation approaches.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the execution parameters by allowing new generation GPU instructions to run on old generation GPUs through instruction translation and semantic mapping. This parameter change enables the simulation to achieve much higher speeds by leveraging hardware-assisted virtualization and optimized translation paths.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If new generation GPU instructions are executed on old generation GPUs, then instruction compatibility is needed, but GPU instruction design does not guarantee sufficient backward compatibility

Engineering Contradiction:
Improveinstruction compatibilityVSAvoidsimulation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The virtualization layer serves as an intermediary that translates new generation GPU instructions into equivalent old generation GPU instructions. The kernel state simulator and user state simulator act as mediators that handle instruction semantic mapping, enabling compatibility without requiring changes to the underlying hardware.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the GPU simulation into distinct layers: kernel state simulation for privileged operations and user state simulation for application-level operations. This segmentation allows each layer to handle compatibility requirements independently, managing complexity through modular design.

Inventive Principle:
Principle #1Segmentation

3Speed

If hardware-assisted virtualization is used for CPU simulation, then simulation speed is improved, but GPU hardware seldom supports virtualization

Engineering Contradiction:
Improvesimulation speedVSAvoidhardware support
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent introduces a virtualization layer as an intermediary between the guest OS and physical GPU hardware. The virtual GPU driver and translation mechanisms act as mediators that enable efficient instruction translation and execution, significantly improving simulation speed compared to traditional software simulation approaches.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a universal virtualization framework that can simulate different GPU architectures and instruction sets on a single physical GPU platform. The kernel state simulator and user state simulator provide multi-functional capabilities that handle various GPU instruction types and semantic variations.

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

Data Source

PatentUS10417023B2GPU simulation method
Publication Date: 2019.09.17 SHANDONG MASSCLOUDS CO LTD
  • US10417023B2 patent drawing
  • US10417023B2 patent drawing
  • US10417023B2 patent drawing

AI summary

A GPU simulation method. An instruction sequence of a client GPU is intercepted in a kernel state simulator based on system virtualization and GPU using principle, and a mechanism is selected according to user configuration to accomplish simulation of the client GPU. In first mechanism, instruction translation is accomplished on low-level semantics based on a binary translation technology, and instructions are executed on a host GPU; in second mechanism, instruction conversion is accomplished using an existing GPU software stack, and instructions are executed on host GPU. The method provides an efficient simulated GPU for a virtual machine based on a host machine physical GPU, and solves the problem of slow GPU simulation. Based on a system virtualization technology and by virtue of a convenient condition provided by an existing GPU software stack, the GPU simulation speed is improved, and the implementation difficulty and complexity of the method are effectively controlled.