IP Library Granted Patent US 11,537,373
Granted Patent B2
US 11,537,373 · App. 17/034,895 · Granted Dec 27, 2022

Systems and methods for scalable hierarchical polyhedral compilation

Inventors: Muthu Manikandan Baskaran (Old Tappan, NJ); Benoit J. Meister (New York, NY); Benoit Pradelle (Brooklyn, NY)
Assignee: Qualcomm Technologies, Inc.
G06F8/4436G06F8/41G06F8/452
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,537,373
App. No.
17/034,895
Granted
Dec 27, 2022
Kind
B2
Abstract

A system for compiling programs for execution thereof using a hierarchical processing system having two or more levels of memory hierarchy can perform memory-level-specific optimizations, without exceeding a specified maximum compilation time. To this end, the compiler system employs a polyhedral model and limits the dimensions of a polyhedral program representation that is processed by the compiler at each level using a focalization operator that temporarily reduces one or more dimensions of the polyhedral representation. Semantic correctness is provided via a defocalization operator that can restore all polyhedral dimensions that had been temporarily removed.

Claims (66)

1. A method for optimizing execution of a program by a processing system comprising a hierarchical memory having a plurality of memory levels, the method comprising:

(a) for each memory level in at least a subset of memory levels in the plurality of memory levels focalizing a loop dimension of a selected loop nest within a program, the loop nest having a nesting level of N, N being greater than 1, focalizing comprising:

selecting, as the loop dimension being focalized, a dimension in which memory accesses are piecewise uniformly generated references (PUGRs) or a dimension in which memory accesses are uniformly generated references (UGRs);

removing an iterator corresponding to a loop index associated with the loop dimension being focalized, reducing the nesting level to N−1;

in the loop nest having the reduced nesting level, at least one of:

(i) removing from a loop condition at another loop dimension of the selected loop nest a subcondition corresponding to the loop index; and

(ii) removing from a memory access expression of an operand, a reference to the loop index; and

storing the loop index and associated focalization information for that memory level; and

(b) for each focalized dimension, defocalizing that dimension by:

adding an iterator based on a reintroduced loop index associated with the loop dimension being defocalized; and

at least one of:

updating a loop condition at another loop dimension of the selected loop nest based on the stored focalization information associated with the loop dimension being defocalized; and

updating the memory access expression of the operand based on the reintroduced loop index and the stored focalization information.

2. The method of claim 1 , further comprising at least one of: (i) tiling the selected loop nest, and (ii) strip mining the selected loop nest, to optimize memory access associated with an operand accessed within the selected loop nest, at that memory level.

3. The method of claim 1 , wherein the focalization information comprises at least one of a loop bound and a tile size.

4. The method of claim 1 , wherein:

a first dimension is focalized at a first memory level; and

a second dimension different from the first dimension is focalized at a second memory level.

5. The method of claim 1 , wherein:

a first dimension is focalized at a first memory level; and

the first dimension is also focalized at a second memory level.

6. The method of claim 5 , wherein:

a first tile size is associated with the first dimension at the first memory level; and

a second tile size different from the first tile size is associated with first dimension at the second memory level.

7. The method of claim 1 , further comprising performing for at least one memory level at least one loop-nest transformation prior to the focalizing step, the loop-nest transformation being selected from the group consisting of loop fission, loop fusion, loop interchange, loop unroll, loop jam and unroll, loop reversal, strip mining, and loop tiling.

8. The method of claim 1 , wherein a characteristic of memory at a first memory level is different from the characteristic of memory at a second memory level, the characteristic being selected from the group consisting of memory size, memory speed, and memory power consumption.

9. The method of claim 1 , further comprising:

determining that all memory access within a candidate loop nest are PUGRs or UGRs; and

selecting the candidate loop nest as the selected loop nest.

10. The method of claim 1 , further comprising:

generating a set of schedule constraints prior to performing the focalizing step; and

testing a violation of the schedule constraints after at least one defocalization step.

11. A system for facilitating optimized execution of a program by a processing system comprising a hierarchical memory having a plurality of memory levels, the system comprising:

a first processor; and

a first memory in electrical communication with the first processor, the first memory comprising instructions which, when executed by a processing unit comprising at least one of the first processor and a second processor, and in electronic communication with a memory module comprising at least one of the first memory and a second memory, program the processing unit to:

(a) for each memory level in at least a subset of memory levels in the plurality of memory levels, focalize a loop dimension of a selected loop nest within a program, the loop nest having a nesting level of N, N being greater than 1, wherein to focalize the loop dimension the instructions program the processing unit to:

select, as the loop dimension being focalized, a dimension in which memory accesses are piecewise uniformly generated references (PUGRs) or a dimension in which memory accesses are uniformly generated references (UGRs);

remove an iterator corresponding to a loop index associated with the loop dimension being focalized, reducing the nesting level to N−1;

in the loop nest having the reduced nesting level, at least one of:

(i) remove from a loop condition at another loop dimension of the selected loop nest a subcondition corresponding to the loop index; and

(ii) remove from a memory access expression of an operand, a reference to the loop index; and

store the loop index and associated focalization information for that memory level; and

(b) for each focalized dimension, defocalize that dimension, wherein to defocalize the dimension the instructions program the processing unit to:

add an iterator based on a reintroduced loop index associated with the loop dimension being defocalized; and

at least one of:

update a loop condition at another loop dimension of the selected loop nest based on the stored focalization information associated with the loop dimension being defocalized; and

update the memory access expression of the operand based on the reintroduced loop index and the stored focalization information.

12. The system of claim 11 , wherein the instructions further program the processing unit to, at least one of: (i) tile the selected loop nest, and (ii) strip mine the selected loop nest, to optimize memory access associated with an operand accessed within the selected loop nest, at that memory level.

13. The system of claim 11 , wherein the focalization information comprises at least one of a loop bound and a tile size.

14. The system of claim 11 , wherein the instructions program the processing unit to:

focalize a first dimension at a first memory level; and

focalize a second dimension different from the first dimension at a second memory level.

15. The system of claim 11 , wherein the instructions program the processing unit to:

focalize a first dimension at a first memory level; and

focalize the first dimension also at a second memory level.

16. The system of claim 15 , wherein:

a first tile size is associated with the first dimension at the first memory level; and

a second tile size different from the first tile size is associated with first dimension at the second memory level.

17. The system of claim 11 , wherein the instructions program the processing unit to perform for at least one memory level at least one loop-nest transformation prior to the focalization operation, the loop-nest transformation being selected from the group consisting of loop fission, loop fusion, loop interchange, loop unroll, loop jam and unroll, loop reversal, strip mining, and loop tiling.

18. The system of claim 11 , wherein a characteristic of memory at a first memory level is different from the characteristic of memory at a second memory level, the characteristic being selected from the group consisting of memory size, memory speed, and memory power consumption.

19. The system of claim 11 , wherein the instructions further program the processing unit to:

determine that all memory access within a candidate loop nest are PUGRs or UGRs; and

select the candidate loop nest as the selected loop nest.

20. The system of claim 11 , wherein the instructions further program the processing unit to:

generate a set of schedule constraints prior to performing the focalization operation; and

test a violation of the schedule constraints after at least one defocalization operation.

Assignments (7)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2023
From: QUALCOMM TECHNOLOGIES, INC.
To: QUALCOMM INCORPORATED
Reel/Frame 064686/0055 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2021
From: SIGNIFICS AND ELEMENTS, LLC
To: QUALCOMM TECHNOLOGIES, INC.
Reel/Frame 058896/0638 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 22, 2021
From: RESERVOIR LABS, INC.
To: LETHIN, RICHARD
Reel/Frame 057880/0116 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 22, 2021
From: LETHIN, RICHARD
To: SIGNIFICS AND ELEMENTS, LLC
Reel/Frame 057880/0146 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2021
From: BASKARAN, MUTHU MANIKANDAN; MEISTER, BENOIT J.; PRADELLE, BENOIT
To: RESERVOIR LABS, INC.
Reel/Frame 057757/0679 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2021
From: RESERVOIR LABS, INC.
To: SIGNIFICS AND ELEMENTS, LLC
Reel/Frame 057346/0516 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 30, 2021
From: RESERVOIR LABS, INC.
To: SIGNIFICS AND ELEMENTS, LLC
Reel/Frame 057364/0569 →