IP Library Granted Patent US 12,724,593
Granted Patent B2
US 12,724,593 · App. 18/129,714 · Granted Sep 1, 2026

Optimizing tensor tiling in neural networks based on a tiling cost model

Inventors: Bowen Yang (Palo Alto, CA); Zhuo Chen (Palo Alto, CA); Chen Liu (Palo Alto, CA); Fei Wang (Palo Alto, CA); Ruobing Wang (Palo Alto, CA); Qinghua Li (Palo Alto, CA); Weiwei Chen (Palo Alto, CA); Junjue Wang (Newark, CA); Sumti Jairath (Palo Alto, CA)
Assignee: SambaNova Systems, Inc.
G06F8/443G06F17/11
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 12,724,593
App. No.
18/129,714
Granted
Sep 1, 2026
Kind
B2
Abstract

A method comprises a compiler analyzing a graph to determine a pipeline of operators based on a shared dimension of input and output tensors among the operators. The operators are included in the graph and the graph corresponds to a dataflow application. The compiler determines a tiling decision associated with the pipeline and a tiling cost associated with the tiling decision. The tiling decision can comprise a tile shape to slice tensors of operators of the pipeline. Based on the tiling cost, the compiler determines that the tiling decision improves an optimization objective and includes the pipeline and tiling decision in mapping decisions associated with executing the application on a computing system. The compiler can apply a tiling cost model to determine the tiling costs. A computer program product and a computing system can implement the method.

Claims (59)

1 . A method, the method comprising:

determining, by a compiler of a first computing system, based on a first shared dimension of output and input tensors of a first set of operators, a first pipeline comprising the first set of operators, the first set of operators among operators included in a graph, the operators included in the graph comprising operators of a dataflow application, wherein a given pair of consecutive operators in the first set of operators is configured such that an output tensor of the first operator in the given pair of consecutive operators has a first dimension equal to the first shared dimension, an input tensor to the second operator in the given pair of consecutive operators has a second dimension also equal to the first shared dimension, and wherein by sharing the first shared dimension, the first set of operators performs computations in parallel;

determining, by the compiler, a first tiling decision associated with the first pipeline, wherein the first tiling decision is based at least on the first shared dimension, and wherein the first tiling decision specifies a tile size and an overlap amount for slicing tensors shared between consecutive operators in the first pipeline;

determining, by the compiler, a first tiling cost associated with the first tiling decision, the first tiling cost corresponding to a first optimization objective, wherein determining the first tiling cost comprises computing, by the compiler using a tiling cost model, a metric indicative of at least one of memory utilization efficiency, processor utilization, and computational parallelism achievable when executing the first pipeline on the second computing system using the tile size and overlap amount;

determining, by the compiler, based on the first tiling cost, that the first tiling decision improves the first optimization objective; and

including, by the compiler, based on the determining that the first tiling decision improves the first optimization objective, the first pipeline and the first tiling decision among mapping decisions associated with executing the dataflow application by a second computing system, wherein the first tiling decision increases parallelization of computations and processor utilization on the second computing system by enabling the second computing system to process multiple tiles of the tensors concurrently across processing elements of the second computing system.

2 . The method of claim 1 , wherein the first pipeline comprises a nested pipeline.

3 . The method of claim 1 , wherein the method further comprises:

determining, by the compiler, a second tiling decision associated with an operator among the operators included in the graph;

determining, by the compiler, a second tiling cost associated with the operator, the second tiling cost corresponding to a second optimization objective;

determining, by the compiler, based on the second tiling cost, that the second tiling decision improves the second optimization objective; and

including, by the compiler, based on the determining that the second tiling decision improves the second optimization objective, the operator and the second tiling decision among mapping decisions associated with executing the dataflow application by the second computing system.

4 . The method of claim 1 , the method further comprising:

determining, by the compiler, based on a second shared dimension of output and input tensors of a second set of operators among the operators included in the graph, a second pipeline comprising the second set of operators;

determining, by the compiler, a second tiling decision associated with the second pipeline;

determining, by the compiler, a second tiling cost corresponding to the second tiling decision, the second tiling cost based on a second optimization objective;

determining, by the compiler, based on the second tiling cost, that the second tiling decision does not improve a second optimization; and

excluding, by the compiler, based on the determining that the second tiling decision does not improve the second optimization objective, the second pipeline from among the mapping decisions associated with executing the dataflow application by the second computing system.

5 . The method of claim 1 , wherein the first tiling decision comprises a first tile shape to slice an output tensor of a first operator, included in the first pipeline, the output tensor comprising an input tensor to a second operator included in the first pipeline.

6 . The method of claim 1 , wherein the method of the compiler determining the first tiling cost comprises determining, by the compiler, the first tiling cost using a tiling cost model to compute the first tiling cost.

7 . The method of claim 1 , wherein the method of determining, by the compiler, based on the first tiling cost, that the first tiling decision improves the first optimization objective comprises comparing, by the compiler, the first tiling cost to a threshold value of an optimization metric associated with the first optimization objective.

8 . The method of claim 1 , wherein the first optimization objective comprises a memory optimization objective selected from a group consisting of: a first tile shape fitting in a first memory of the second computing system; increasing a utilization of a second memory of the second computing system; reducing a number of stage buffers among a first producer operator and a first consumer operator included in the first pipeline; and, reducing a size of a stage buffer among a second producer operator and a second consumer operator.

9 . The method of claim 1 , wherein the first optimization objective comprises a processing optimization objective selected from a group consisting of: increasing a number of operators comprising the first pipeline; increasing a number of parallel operations performed by the second computing system to execute the dataflow application; increasing a utilization of a first processor of the second computing system to execute the dataflow application; and, balancing pipeline stages in the first pipeline.

10 . A computer program product, the computer program product comprising a computer readable storage medium having first program instructions embodied therewith, wherein the first program instructions are executable by at least one processor to cause the at least one processor to:

determine, based on a first shared dimension of output and input tensors of a first set of operators, a first pipeline comprising the first set of operators, the first set of operators among operators included in a graph, the operators included in the graph comprising operators of a dataflow application, wherein a given pair of consecutive operators in the first set of operators is configured such that an output tensor of the first operator in the given pair of consecutive operators has a first dimension equal to the first shared dimension, and an input tensor to the second operator in the given pair of consecutive operators has a second dimension also equal to the first shared dimension, and wherein by sharing the first shared dimension, the first set of operators performs computations in parallel;

determine a first tiling decision associated with the first pipeline, wherein the first tiling decision is based at least on the first shared dimension, and wherein the first tiling decision specifies a tile size and an overlap amount for slicing tensors shared between consecutive operators in the first pipeline;

determine, a first tiling cost associated with the first tiling decision, the first tiling cost corresponding to a first optimization objective, wherein determining the first tiling cost comprises computing, using a tiling cost model, a metric indicative of at least one of memory utilization efficiency, processor utilization, and computational parallelism achievable when executing the first pipeline on the second computing system using the tile size and overlap amount;

determine, based on the first tiling cost, that the first tiling decision improves the first optimization objective; and

include, based on the determining that the first tiling decision improves the first optimization objective, the first pipeline and the first tiling decision among mapping decisions associated with executing the dataflow application by a second computing system, wherein the first tiling decision increases parallelization of computations and processor utilization on the second computing system by enabling the second computing system to process multiple tiles of the tensors concurrently across processing elements of the second computing system.

11 . The computer program product of claim 10 , wherein the first program instructions are executable by the at least one processor to further cause the at least one processor to:

determine the first tiling cost using a tiling cost model to compute the first tiling cost.

12 . The computer program product of claim 10 , wherein the first program instructions are executable by the at least one processor to further cause the at least one processor to:

determine a second tiling decision associated with an operator among the operators included in the graph;

determine a second tiling cost associated with the operator, the second tiling cost corresponding to a second optimization objective;

determine, based on the second tiling cost, that the second tiling decision does not improve a second optimization objective; and

exclude, based on the determining that the second tiling decision improves the second optimization objective, the operator and the second tiling decision among mapping decisions associated with executing the dataflow application by the second computing system.

13 . A first computing system, the first computing system comprising:

a processor and a compiler, the compiler configured to execute on the processor to:

determine, based on a first shared dimension of output and input tensors of a first set of operators, a first pipeline comprising the first set of operators, the first set of operators among operators included in a graph, the operators included in the graph comprising operators of a dataflow application, wherein a given pair of consecutive operators in the first set of operators is configured such that an output tensor of the first operator in the given pair of consecutive operators has a first dimension equal to the first shared dimension, and an input tensor to the second operator in the given pair of consecutive operators has a second dimension also equal to the first shared dimension, and wherein by sharing the first shared dimension, the first set of operators performs computations in parallel;

determine a first tiling decision associated with the first pipeline, wherein the first tiling decision is based at least on the first shared dimension, and wherein the first tiling decision specifies a tile size and an overlap amount for slicing tensors shared between consecutive operators in the first pipeline;

determine a first tiling cost associated with the first tiling decision, the first tiling cost corresponding to a first optimization objective, wherein determining the first tiling cost comprises computing, using a tiling cost model, a metric indicative of at least one of memory utilization efficiency, processor utilization, and computational parallelism achievable when executing the first pipeline on the second computing system using the tile size and overlap amount;

determine, based on the first tiling cost, that the first tiling decision improves the first optimization objective; and

include, based on the determining that the first tiling decision improves the first optimization objective, the first pipeline and the first tiling decision among mapping decisions associated with executing the dataflow application by a second computing system, wherein the first tiling decision increases parallelization of computations and processor utilization on the second computing system by enabling the second computing system to process multiple tiles of the tensors concurrently across processing elements of the second computing system.

14 . The first computing system of claim 13 , wherein the first pipeline comprises a nested pipeline.

15 . The first computing system of claim 13 , wherein the compiler is further configured to execute on the processor to:

determine a second tiling decision associated with an operator among the operators included in the graph;

determine a second tiling cost associated with the operator, the second tiling cost corresponding to a second optimization objective;

determine, based on the second tiling cost, that the second tiling decision improves the second optimization objective; and

include, based on the determining that the second tiling decision improves the second optimization objective, the operator and the second tiling decision among mapping decisions associated with executing the dataflow application by the second computing system.

16 . The first computing system of claim 13 , wherein the compiler is further configured to execute on the processor to:

determine, based on a second shared dimension of output and input tensors of a second set of operators among the operators included in the graph, a second pipeline comprising the second set of operators;

determine a second tiling decision associated with the second pipeline;

determine a second tiling cost corresponding to the second tiling decision, the second tiling cost based on a second optimization objective;

determine, based on the second tiling cost, that the second tiling decision does not improve a second optimization; and

exclude, based on the determining that the second tiling decision does not improve the second optimization objective, the second pipeline from among the mapping decisions associated with executing the dataflow application by the second computing system.

17 . The first computing system of claim 13 , wherein the first tiling decision comprises a first tile shape to slice an output tensor of a first operator, included in the first pipeline, the output tensor comprising an input tensor to a second operator included in the first pipeline.

18 . The first computing system of claim 13 , wherein the compiler configured to execute on the processor to determine the first tiling cost comprises the compiler further configured to execute on the processor to determine the first tiling cost by comparing the first tiling cost to a threshold value of an optimization metric associated with the first optimization objective.

19 . The first computing system of claim 13 , wherein the first optimization objective comprises a memory optimization objective selected from a group consisting of: a first tile shape fitting in a first memory of the second computing system; increasing a utilization of a second memory of the second computing system; reducing a number of stage buffers among a first producer operator and a first consumer operator included in the first pipeline; and, reducing a size of a stage buffer among a second producer operator and a second consumer operator.

20 . The first computing system of claim 13 , wherein the first optimization objective comprises a processing optimization objective selected from a group consisting of: increasing a number of operators comprising the first pipeline; increasing a number of parallel operations performed by the second computing system to execute the dataflow application; increasing a utilization of a first processor of the second computing system to execute the dataflow application; and, balancing pipeline stages in the first pipeline.

Assignments (2)
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Apr 18, 2025
From: SAMBANOVA SYSTEMS, INC.
To: SILICON VALLEY BANK, A DIVISION OF FIRST-CITIZENS BANK & TRUST COMPANY, AS AGENT
Reel/Frame 070892/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 8, 2023
From: YANG, BOWEN; CHEN, ZHUO; LIU, CHEN; WANG, FEI; WANG, RUOBING; LI, QINGHUA; CHEN, WEIWEI; WANG, JUNJUE; JAIRATH, SUMTI
To: SAMBANOVA SYSTEMS, INC.
Reel/Frame 063563/0075 →
Continuity (6)
Provisional Application 63330730 · Apr 13, 2022
Provisional Application 63330740 · Apr 13, 2022
Provisional Application 63327313 · Apr 4, 2022
Provisional Application 63326762 · Apr 1, 2022
Provisional Application 63326206 · Mar 31, 2022
Related Publication 20230315410A1 · Oct 5, 2023
References Cited (49)
US 8146040B1 · Janneck et al. · 2012 [cited by applicant]
US 10768979B2 · Williams · 2020 [cited by applicant]
US 11062202B2 · James et al. · 2021 [cited by applicant]
US 11080227B2 · Koeplinger et al. · 2021 [cited by applicant]
US 11163546B2 · Rong · 2021 [cited by applicant]
US 11182221B1 · Sivaramakrishnan et al. · 2021 [cited by applicant]
US 11195080B1 · Nama et al. · 2021 [cited by applicant]
US 11227207B1 · Nama et al. · 2022 [cited by applicant]
US 11328208B2 · Lie et al. · 2022 [cited by applicant]
US 11410027B2 · Chen et al. · 2022 [cited by applicant]
US 11500871B1 · Kulkarni et al. · 2022 [cited by applicant]
US 11521062B2 · Janssen et al. · 2022 [cited by applicant]
US 11567735B1 · Kulkarni et al. · 2023 [cited by applicant]
US 12293298B2 · Elango · 2025 [cited by applicant]
US 20190146763A1 · Gould · 2019 [cited by applicant]
US 20190228037A1 · Nicol et al. · 2019 [cited by applicant]
US 20190279086A1 · Nicol et al. · 2019 [cited by applicant]
US 20190340492A1 · Burger · 2019 [cited by examiner]
US 20200133859A1 · Gottin et al. · 2020 [cited by applicant]
US 20200216900A1 · Bunyavanich · 2020 [cited by examiner]
US 20210049465A1 · Bogdan et al. · 2021 [cited by applicant]
US 20210320825A1 · Banuli Nanje Gowda · 2021 [cited by examiner]
US 20210365248A1 · ChoFleming, Jr. et al. · 2021 [cited by applicant]
US 20220012028A1 · Yount et al. · 2022 [cited by applicant]
US 20220276865A1 · Rieber · 2022 [cited by applicant]
US 20220309336A1 · Minkin · 2022 [cited by examiner]
US 20230004365A1 · Hanebutte · 2023 [cited by examiner]
US 20230023101A1 · Su · 2023 [cited by examiner]
WO 2010142987A1 · 2010 [cited by applicant]
Koeplinger et al., Spatial: A Language and Compiler for Application Accelerators, PLDI '18, Jun. 18-22, 2018, Association for Computng Machinery, 16 pages. [cited by applicant]
List of related cases—SBNV1114USC01, Jun. 6, 2024, 2 pages. [cited by applicant]
M. Emani et al., Accelerating Scientific Applications With Sambanova Reconfigurable Dataflow Architecture, in Computing in Science & Engineering, vol. 23, No. 2, pp. 114-119, Mar. 26, 2021, [doi: 10.1109/ MCSE.2021.3057… [cited by applicant]
Podobas et al, A Survey on Coarse-Grained Reconfigurable Architectures From a Performance Perspective, IEEEAccess, vol. 2020.3012084, Jul. 27, 2020, 25 pages. [cited by applicant]
Prabhakar et al., Plasticine: A Reconfigurable Architecture for Parallel Patterns, ISCA, Jun. 24-28, 2017, 14 pages. [cited by applicant]
U.S. Appl. No. 16/239,252 Final Office Action, dated Jan. 8, 2020, 13 pages. [cited by applicant]
U.S. Appl. No. 16/239,252—Notice of Allowance dated Feb. 12, 2020, 10 pages. [cited by applicant]
U.S. Appl. No. 16/239,252—Office Action dated Aug. 7, 2019, 8 pages. [cited by applicant]
U.S. Appl. No. 16/239,252—Response to Final Office Action dated Jan. 8, 2020, filed Jan. 24, 2020, 14 pages. [cited by applicant]
U.S. Appl. No. 16/239,252—Response to Office Action dated Aug. 7, 2019, filed Sep. 26, 2019, 6 pages. [cited by applicant]
U.S. Appl. No. 17/216,651 Notice of Allowance, dated Aug. 5, 2021, 14 pages. [cited by applicant]
U.S. Appl. No. 17/216,651 Response to First Office Action, dated Jul. 13, 2021, filed Jul. 23, 2021, 14 pages. [cited by applicant]
U.S. Appl. No. 17/216,652 Non-Final Rejection, dated Aug. 2, 2021, 24 pages. [cited by applicant]
U.S. Appl. No. 16/239,252—Notice of Allowance dated May 14, 2020, 15 pages. [cited by applicant]
U.S. Appl. No. 17/216,651—Non-Final Rejection, dated Jul. 13, 2021, 12 pages. [cited by applicant]
Bosilca, George, et al. “The Template Task Graph (TTG)—an emerging practical dataflow programming paradigm for scientific simulation at extreme scale.” 2020 IEEE/ACM Fifth International Workshop on Extreme Scale Program… [cited by applicant]
Chien, Steven WO, et al. “TensorFlow doing HPC.” 2019 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW). IEEE, 2019. pp. 509-518. (Year: 2019). [cited by applicant]
Kirisame, Marisa, et al. “Dynamic tensor rematerialization.” arXiv preprint arXiv:2006.09616 (2020). pp. 1-31. (Year: 2020). [cited by applicant]
Liao et al. Differentiable programming tensor networks, Physical review X 9.3 (2019): pp. 031041-1 to 031041-12. (Year : 2019). [cited by applicant]
Yuan et al, Dynamic control flow in large-scale machine learning, Proceedings of the Thirteenth EuroSys Conference, 2018.pp. 1-15 (Year:2018). [cited by applicant]