Optimizing software code
US-2015378757-A1 · Dec 31, 2015 · US
US10713022B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-10713022-B2 |
| Application number | US-201514927053-A |
| Country | US |
| Kind code | B2 |
| Filing date | Oct 29, 2015 |
| Priority date | Oct 29, 2014 |
| Publication date | Jul 14, 2020 |
| Grant date | Jul 14, 2020 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
In a sequence of major computational steps or in an iterative computation, a stencil amplifier can increase the number of data elements accessed from one or more data structures in a single major step or iteration, thereby decreasing the total number of computations and/or communication operations in the overall sequence or the iterative computation. Stencil amplification, which can be optimized according to a specified parameter such as compile time, run time, code size, etc., can improve the performance of a computing system executing the sequence or the iterative computation in terms of run time, memory load, energy consumption, etc. The stencil amplifier typically determines boundaries, to avoid erroneously accessing data elements not present in the one or more data structures.
Opening claim text (preview).
What is claimed is: 1. A method for improving processing efficiency, the method comprising performing by a processor the steps of: in a specified computation defining iterations of execution of a stencil, wherein: the stencil comprises a set of stencil points, each stencil point corresponding to a respective element of a data structure; and in any iteration, an execution of the stencil comprises accessing only the elements of the data structure corresponding to the set of stencil points and not accessing other elements of the data structure, modifying the specified computation by amplifying the stencil according to a specified amplification factor (T), by recursively replacing a stencil point with a substencil comprising a set of substencil points corresponding to prior iterations from immediately prior iteration up to the (T+1)-th prior iteration, wherein: each substencil point corresponds to a respective element of the data structure; and at least one substencil point corresponds to an element of the data structure that is different from all elements of the data structure that correspond to the set of stencil points, wherein execution of the modified computation comprises: accessing from the memory, in an iteration of execution of the amplified stencil, the element of the data structure that corresponds to the at least one substencil point; computing a function of values of respective elements of the data structure corresponding to the set of substencil points; and reducing a number of iterations of the specified computation by the factor (T+1). 2. The method of claim 1 , wherein modifying the computation comprises generating a loop nest corresponding to at least one stencil point, the loop nest comprising a loop corresponding to a parameterized dimension of the data structure, the loop comprising a statement accessing an element of the data structure in the parameterized dimension according to a parameter based at least in part on the loop index. 3. The method of claim 2 , wherein the loop nest corresponds to at least one absolute dimension of the data structure. 4. The method of claim 1 , wherein modifying the computation comprises generating a statement corresponding to a stencil point at which all dimensions of the data structure are absolute. 5. The method of claim 1 , wherein: elements of the data structure corresponding to the stencil are represented using a central vector associated with the stencil and a respective offset vector associated with a corresponding stencil point, a cardinality of the central vector and a cardinality of the offset vector being equal to a number of spatial dimensions of the data structure, and each spatial dimension of the data structure corresponding to a respective element of the central vector and a respective element of the offset vector; the substencil comprises first-level substencil points corresponding to the immediately prior iteration; and computing the function of values of respective elements of the data structure comprises: for each first-level substencil point, computing a first-level resulting offset vector as a combination of the offset vector associated with the stencil point and an offset vector corresponding to that first-level substencil point; and specifying elements of the data structure associated with each first-level substencil point using the central vector associated with the stencil and a combination of an offset vector associated with the replaced stencil point and a first-level offset vector associated with a corresponding first-level substencil point. 6. The method of claim 5 , further comprising: for each spatial dimension associated with the resulting offset vectors corresponding to the first-level substencil points: determining a first-level maximum offset value; and from a boundary of the data structure in that spatial dimension, designating any data-structure element within a distance less than the first-level maximum offset value as a boundary element; designating a stencil point from the set of stencil points as a boundary point if that stencil point corresponds to a boundary element; and selecting a stencil point from the stencil, for replacement thereof with the first-level substencil points, only if that stencil point is not designated as a boundary point. 7. The method of claim 5 , further comprising: remodifying the computation by replacing a first-level substencil point with a second-level substencil comprising a set of second-level substencil points, each second-level substencil point corresponding to an iteration prior to the immediately prior iteration, and to a respective element of the data structure, at least one second-level substencil point corresponding to an element of the data structure that is different from all elements of the data structure that correspond to the set of stencil points and all first-level substencil points. 8. The method of claim 7 , wherein modifying the computation further comprises: for each second-level substencil point of the second-level substencil, computing a second-level resulting offset vector as a combination of the first-level resulting offset vector associated with a first-level substencil point to be replaced with the second-level substencil and an offset vector corresponding to that second-level substencil point; and representing the first-level substencil point as a function of values of respective elements of the data structure corresponding to the set of second-level substencil points, each element of the data structure being specified using a central vector associated with the stencil and a second-level resulting offset vector associated with a corresponding second-level substencil point. 9. The method of claim 8 , further comprising: for each spatial dimension associated with the resulting offset vectors corresponding to the second-level substencil: determining a second-level maximum offset value; and from a boundary of the data structure in that spatial dimension, designating any data-structure element within a distance less than the second-level maximum offset value as a boundary element; designating a stencil point from the set of stencil points as a boundary point if that stencil point corresponds to a boundary element; and selecting a stencil point from the stencil, for replacement thereof with the second-level substencil, only if that stencil point is not designated as a boundary point. 10. The method of claim 7 , wherein at least one of: (i) a cardinality of the set of first-level substencil points, and (ii) a cardinality of the set of second-level substencil points is greater than one. 11. The method of claim 1 , wherein: each stencil point in a subset of stencil points from the set of stencil points is associated with a respective stencil coefficient; the substencil comprises a set of first-level substencil points corresponding to the immediately prior iteration; each first-level substencil point in a subset of first-level substencil points from the set of first-level stencil points is associated with a respective first-level substencil coefficient; and modifying the computation comprises generating a coefficient computation that produces a resulting coefficient, based on a stencil coefficient and a first-level substencil coefficient. 12. The method of claim 11 , wherein: the computation comprises a first stencil point and a second stencil point; modifying the computation comprises: replacing the first stencil point, having associated therewith a first stencil coefficient, with a first first-level substencil comprising a first first-level substencil point, having associated therewith a firs
Reducing the execution time required by the program code · CPC title
Reducing the memory space required by the program code · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.