Inserting predefined pad values into a stream of vectors
Abstract
Software instructions are executed on a processor within a computer system to configure a steaming engine with stream parameters to define a multidimensional array. The stream parameters define a size for each dimension of the multidimensional array and a pad value indicator. Data is fetched from a memory coupled to the streaming engine responsive to the stream parameters. A stream of vectors is formed for the multidimensional array responsive to the stream parameters from the data fetched from memory. A padded stream vector is formed that includes a specified pad value without accessing the pad value from system memory.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. A method of operating a streaming engine in a computer system, the method comprising:
receiving, by the streaming engine, stream parameters into control logic of the streaming engine to define a multidimensional array, wherein the stream parameters include a width indicator for a dimension of the multidimensional array, wherein the width indicator includes a width count;
generating, by an address generator, an address stream based on the stream parameters;
retrieving, by the streaming engine, a line of matrix data from a memory based on the address stream; and
forming, by the streaming engine, a stream vector in response to a status of the width count.
2. The method of claim 1 , wherein:
the status of the width count is depleted.
3. The method of claim 2 , wherein:
the status of the width count is not saturated.
4. The method of claim 3 , wherein:
the stream vector is formed by masking a portion of the stream vector that exceeds the width count.
5. The method of claim 4 , wherein:
a value of zero is inserted in the portion of the stream vector that is masked.
6. The method of claim 4 , wherein:
a predefined value is inserted in the portion of the stream vector that is masked.
7. The method of claim 6 , wherein:
the predefined value is one of a minimum value and a maximum value.
8. The method of claim 2 , wherein:
the status of the width count is saturated.
9. The method of claim 8 , wherein:
the stream vector is a null vector formed without accessing the memory.
10. The method of claim 9 , wherein:
the null vector is all zeros.
11. The method of claim 9 , wherein:
the null vector is a predetermined value.
12. The method of claim 11 , wherein:
the predetermined value is selected from one of a minimum value and a maximum value.
13. The method of claim 11 , wherein:
the predetermined value is designated by a flag value in the stream parameters.
14. The method of claim 1 , further comprising:
decrementing the width count.
15. The method of claim 14 , further comprising:
in response to matrix data remaining to be retrieved, retrieving, by the streaming engine, a next line of the matrix data.
16. A system, comprising:
a system memory;
a streaming engine coupled to access the system memory, the streaming engine configured to:
receive stream parameters defining a multidimensional array, wherein the stream parameters include a width indicator for each dimension of the multidimensional array, wherein the width indicator includes a width count;
generate an address stream based on the stream parameters;
retrieve a line of matrix data from the system memory based on the address stream; and
form a stream of vectors in response to a status of the width count of the width indicator; and
a processing unit coupled to outputs of the streaming engine to receive the stream of vectors.
17. The system of claim 16 , wherein:
the status of the width count is depleted and not saturated.
18. The system of claim 17 , wherein:
the stream of vectors is formed by masking a portion of the stream of vectors that exceeds the width count.
19. The system of claim 16 , wherein:
the status of the width count is depleted and saturated.
20. The system of claim 19 , wherein:
the stream of vectors includes a null vector formed without accessing the system memory.Join the waitlist — get patent alerts
Track US11907721B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.