AI Accelerator Variable Replacement for Code Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing AI accelerators face challenges in efficiently replacing variables in AI accelerator code with actual values, leading to potential security issues, machine stability problems, and lack of backward compatibility, as conventional processes are inefficient and not feasible within the AI accelerator itself.

Innovation Solution

A system and method within the AI accelerator that includes a processor and memory to compute a table of variables from a template AI accelerator code, replacing variables with actual values using a pipeline circuit to create a variable-replaced AI accelerator code, ensuring only manufacturer-validated code is executed and maintaining backward compatibility.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If variable replacement is performed using conventional external processes, then code flexibility is maintained, but security and stability are compromised due to execution of unvalidated code

Engineering Contradiction:
Improvecode security and stabilityVSAvoidvariable replacement process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent performs variable replacement in advance during code loading, before execution. The AI accelerator replaces variables with actual values from a table during initialization, ensuring that only pre-validated code with resolved variables is executed. This preliminary action eliminates security risks associated with runtime variable manipulation while maintaining system reliability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary variable replacement module within the AI accelerator that acts as a mediator between the external code source and the execution engines. This module receives template code, performs variable substitution using a variable table, and outputs validated code to the engines. The intermediary ensures security by confining variable replacement operations within the trusted boundary of the AI accelerator.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If just-in-time compilation is used for variable replacement, then code execution speed is improved, but system resource consumption and stability increase

Engineering Contradiction:
Improvecode execution speedVSAvoidsystem resource consumption
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

Instead of performing variable replacement at runtime through just-in-time compilation, the patent performs all variable substitutions in advance during code loading. The variable replacement module processes template code and generates fully-resolved executable code before it reaches the AI engines. This eliminates the need for resource-intensive runtime compilation while maintaining fast execution speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the variable replacement operation from the runtime execution path and performs it separately during code initialization. By separating the variable substitution process from the critical execution path, the system avoids the overhead of just-in-time compilation during actual AI workloads, reducing energy consumption while preserving execution speed.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If template code with variables is executed directly, then code reusability is maintained, but backward compatibility is lost

Engineering Contradiction:
Improvecode reusabilityVSAvoidcode compatibility management
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent creates a copy of the template code and performs variable replacement on the copy before execution. The original template code remains unchanged and reusable, while the substituted copy is tailored for specific execution contexts. This copying approach maintains code reusability by preserving the original templates while enabling backward compatibility through generated compatible instances.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent performs variable replacement in advance to generate compatibility-adapted code versions. By pre-processing template code with specific variable bindings, the system creates executable versions that are guaranteed to be compatible with the target hardware architecture, eliminating runtime compatibility issues while preserving template reusability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11782683B1Variable replacement by an artificial intelligence accelerator
Publication Date: 2023.10.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11782683B1 patent drawing
  • US11782683B1 patent drawing
  • US11782683B1 patent drawing

AI summary

A system for variable replacement in a template artificial intelligence (AI) accelerator code. The system includes: at least one memory; at least one processor communicatively coupled to the at least one memory, and configured for computing at least one table of variables from a template AI accelerator code; and an AI accelerator including a plurality of engines, and communicatively coupled to the at least one processor and the at least one memory. The AI accelerator is configured to create a variable replaced AI accelerator code for the plurality of engines of the AI accelerator from the template AI accelerator code by replacing variables in the template AI accelerator code with actual values from the at least one table of variables.