Matrix Calculation Framework Optimizing Temporary Storage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing matrix calculation methods in programming languages and mathematical libraries are inefficient in resource usage, particularly due to excessive temporary storage requirements, and lack optimization at the expression level, leading to memory issues when dealing with large data sizes.
Innovation Solution
A matrix calculation method and device that convert matrix expressions into transformation expressions, classifying operations into types that can be computed with either partial or full access to operand matrix values, optimizing storage and computation by delaying calculations and using a matrix calculation framework to manage temporary storage and resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If existing matrix calculation methods are used, then matrix operations can be performed, but excessive temporary storage space is required and computing resources are used inefficiently
Solution Approach 1:
The patent segments the matrix expression into multiple operation types (first type operations that can be computed with partial access to operand values, and second type operations that require full access). This segmentation allows different storage strategies to be applied to different operation types, reducing overall temporary storage requirements while maintaining computational efficiency.
Solution Approach 2:
The patent performs preliminary classification of operations into types before execution. By identifying which operations can be computed with partial access versus full access to operand values, the system can prepare appropriate storage allocations in advance, avoiding excessive temporary storage allocation and improving computational throughput.
2Productivity
If optimization is provided only in units of matrix operations, then individual operations are optimized, but entire matrix expressions cannot be optimized
Solution Approach 1:
The patent creates a universal optimization framework that handles both individual matrix operations and entire matrix expressions through a common classification mechanism. The operation type classification system serves multiple functions: it optimizes single operations when executed independently and optimizes sequences of operations when part of a larger expression, providing versatile optimization capability across different contexts.
Solution Approach 2:
The patent implements dynamic optimization by classifying operations based on their specific characteristics and the context in which they appear. The system can adaptively determine whether to optimize individual operations or entire expressions based on the operation types involved, making the optimization process flexible and context-aware rather than rigid and one-size-fits-all.
3Reliability
If temporary storage space is allocated for each operation result, then calculation results can be stored, but memory space becomes insufficient when matrix data size is large
Solution Approach 1:
The patent applies different storage quality requirements to different operation types. First type operations (computable with partial access) require less stringent storage requirements compared to second type operations (requiring full access). This local differentiation of storage quality allows the system to maintain calculation result reliability where needed while minimizing overall memory consumption.
Solution Approach 2:
The patent changes the storage parameter (amount of temporary space required) based on the operation type. By identifying operations that can tolerate partial access to operand values, the system reduces the storage parameter for those operations, thereby reducing total memory requirements while maintaining the ability to store necessary calculation results for correctness.
Data Source
AI summary
Provided are a matrix calculation method and device. According to some embodiments of the present invention, a matrix calculation framework intervenes in the compilation or execution of program code including a matrix expression, thereby optimizing matrix calculation. Accordingly, the program code creator's burden of optimizing the matrix calculation can be reduced.


