Packed Data Convolution Instruction with Shift and Width Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current processor architectures face inefficiencies in executing convolution operations due to the need for manual data organization and the use of multiple instructions for convolution filters, leading to increased compute resources and path lengths, especially for separable convolution filters that require byte-level shifts and masking.
Innovation Solution
The introduction of a packed data convolution instruction with shift control and width control allows programmers to specify the convolution operation's width and stride as inputs, eliminating the need for separate masking and shuffling instructions, thereby reducing the number of instructions required and integrating data shuffling with convolution arithmetic operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If manual data organization and multiple instructions are used for convolution filters, then convolution operations can be executed, but the number of instructions increases and CPU resources are consumed
Solution Approach 1:
The patent combines multiple separate instructions (masking instructions, shuffling instructions, and convolution instructions) into a single packed data convolution instruction with shift control and width control. This merging eliminates the need for separate data organization steps, reducing the total instruction count while maintaining convolution functionality for separable filters.
Solution Approach 2:
The packed data convolution instruction with shift control and width control serves multiple functions: it performs the convolution operation, controls the width of the sliding window, and manages data shifting and masking. This multi-functional instruction replaces several specialized instructions, reducing complexity while preserving all necessary convolution capabilities.
2Ease of operation
If separate masking and shuffling instructions are used, then data can be organized for convolution, but the path length increases and performance decreases
Solution Approach 1:
The patent merges masking, shuffling, and convolution operations into a single instruction execution path. By integrating these previously separate steps into one unified packed data convolution instruction with shift control and width control, the execution path length is reduced, eliminating sequential dependencies and improving throughput.
3Device complexity
If fixed-width convolution instructions are used, then simple implementation is achieved, but adaptability to varying widths and offsets is limited
Solution Approach 1:
The patent introduces dynamic control capabilities to the convolution instruction through shift control and width control fields. These control parameters allow the instruction to adapt to varying convolution widths and offsets at runtime, transforming a fixed-width instruction into a dynamically adjustable one without requiring multiple specialized instructions.
Solution Approach 2:
The patent enables parameter changes in the convolution operation by incorporating shift control and width control as programmable parameters. These parameters can be modified based on the specific convolution requirements, allowing a single instruction to handle different filter sizes and offsets by changing control parameters rather than requiring different instructions.
Data Source
AI summary
Systems, methods, and apparatuses to support packed data convolution instructions with shift control and width control are described. In one embodiment, a hardware processor includes a decoder circuit to decode a single instruction into a decoded single instruction, the single instruction having fields that identify a first packed data source, a second packed data source, a packed data destination, a sliding window width, and a stride, and an opcode that indicates an execution circuit is to generate a first chunk of contiguous elements of the first packed data source having a width of the sliding window width, generate a second chunk of contiguous elements of the first packed data source having the width of the sliding window width and shifted by the stride, multiply each element of the first chunk by a corresponding element of a respective chunk of the second packed data source to generate a first set of products, add the first set of products together to generate a first sum, multiply each element of the second chunk by a corresponding element of a respective chunk of the second packed data source to generate a second set of products, add the second set of products together to generate a second sum, and store the first sum in a first element of the packed data destination and the second sum in a second element of the packed data destination; and the execution circuit is to execute the decoded single instruction according to the opcode.


