Code Generation System Optimizing Memory Through Block Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Computational systems face challenges in processing large data sets due to high memory requirements, which can be costly and inefficient, especially when dealing with data structures like images, as they often need to operate on entire datasets at once, consuming significant resources.

Innovation Solution

A code generation system that configures functional elements with block size parameters and data order preferences, using a query engine to optimize intermediate representations and generate code that minimizes memory usage and maximizes execution speed by processing data in efficient block sizes and orders, employing techniques like fragmentation and reassembly to achieve specified criteria such as reducing memory demands.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a computational system operates on the entire input data structure at once, then processing can be completed in a single pass, but memory requirements become prohibitively large and expensive

Engineering Contradiction:
Improveprocessing throughputVSAvoidmemory requirements
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent divides the input data structure into multiple blocks that can be processed sequentially. The system operates on one block at a time, processes it, and then moves to the next block, thereby reducing the memory footprint from requiring the entire dataset to only requiring a single block in memory at any given time.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The computational system employs periodic action by repeatedly bringing blocks into memory, processing them, and removing them in a cyclic manner. This allows the system to process the entire dataset over multiple passes rather than requiring all data to be simultaneously available in memory.

Inventive Principle:
Principle #19Periodic action

2Quantity of substance

If a computational system is configured to operate on portions of input data, then memory requirements are reduced, but processing time increases due to multiple passes over the data

Engineering Contradiction:
Improvememory requirementsVSAvoidprocessing time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-configuring functional elements with block size parameters and data order preferences before processing begins. The query engine queries these functional elements to obtain their optimal block sizes and data orders in advance, allowing the intermediate representation to be optimized beforehand rather than during processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts processing parameters including block sizes and data orders based on the characteristics of the input data and the capabilities of the functional elements. By changing these parameters optimally, the system minimizes the number of passes required while still operating within reduced memory constraints.

Inventive Principle:
Principle #35Parameter changes

3Speed

If functional elements are configured with optimal block sizes and data orders, then execution speed is maximized, but the complexity of code generation and optimization increases

Engineering Contradiction:
Improveexecution speedVSAvoidcode generation complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent introduces an intermediate representation as a mediator between the input code and the generated code. This intermediate representation serves as a simplified model that captures the essential processing logic while allowing for systematic optimization. The query engine queries functional elements to obtain their preferences, and this information is used to modify the intermediate representation, which is then used to generate optimized code.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces manual code optimization processes with an automated query engine and intermediate representation system. Instead of requiring developers to manually configure block sizes and data orders for each functional element, the system automatically queries the functional elements for their preferences and generates optimized code, thereby reducing the complexity burden on the development process.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS9009690B1Code generation
Publication Date: 2015.04.14 MATHWORKS INC
  • US9009690B1 patent drawing
  • US9009690B1 patent drawing
  • US9009690B1 patent drawing

AI summary

In one embodiment, input code is received having a plurality of functional elements that process data elements. At least one criterion for generated code is also received. A first intermediate representation of the input code is built that has a plurality of nodes that represent the functional elements. Block sizes are assigned to two or more nodes of a first intermediate representation. The first intermediate representation is modified to create a second intermediate representation that satisfies the at least one criterion, and organizes at least some of the nodes of the first intermediate representation based on the block sizes.