词条 | Roofline model |
释义 |
The Roofline model is an intuitive visual performance model used to provide performance estimates of a given compute kernel The most basic Roofline model can be visualized by plotting floating-point performance as a function of machine peak performance{{vague|date=January 2018}}{{clarify|date=January 2018}}, machine peak bandwidth, and arithmetic intensity. The resultant curve is effectively a performance bound under which kernel or application performance exists, and includes two platform-specific performance ceilings{{clarify|reason=What is a ceiling in this context?|date=January 2018}}: a ceiling derived from the memory bandwidth and one derived from the processor's peak performance (see figure on the right). Related terms and performance metricsWorkThe work denotes the number of operations performed by a given kernel or application.[1] This metric may refer to any type of operation, from number of array points updated, to number of integer operations, to number of floating point operations (FLOPs)[1], and the choice of one or another is driven by convenience. In the majority of the cases however, is expressed as FLOPs.[1][4][5][2][3] Note that the work is a property of the given kernel or application and thus depend just partially on the platform characteristics. Memory trafficThe memory traffic denotes the number of bytes of memory transfers incurred during the execution of the kernel or application.[1] In contrast to , is heavily dependent on the properties of the chosen platform, such as for instance the structure of the cache hierarchy.[1] Arithmetic intensityThe arithmetic intensity , also referred to as operational intensity,[4][4] is the ratio of the work to the memory traffic :[1]and denotes the number of operations per byte of memory traffic. When the work is expressed as FLOPs, the resulting arithmetic intensity will be the ratio of floating point operations to total data movement (FLOPs/byte). Naive RooflineThe naïve Roofline[5] is obtained by applying simple bound and bottleneck analysis.[6] In this formulation of the Roofline model, there are only two parameters, the peak performance and the peak bandwidth A given kernel or application is then characterized by a point given by its arithmetic intensity (on the x-axis). The attainable performance is then computed by drawing a vertical line that hits the Roofline curve. Hence. the kernel or application is said to be memory-bound if . Conversely, if , the computation is said to be compute-bound.[7] Adding ceilings to the modelThe naive Roofline provides just an upper bound (the theoretical maximum) to performance. Although it can still give useful insights on the attainable performance, it does not provide a complete picture of what is actually limiting it. If, for instance, the considered kernel or application performs far below the Roofline, it might be useful to capture other performance ceilings, other than simple peak bandwidth and performance, to better guide the programmer on which optimization to implement, or even to assess the suitability of the architecture used with respect to the analyzed kernel or application.[5] The added ceilings impose then a limit on the attainable performance that is below the actual Roofline, and indicate that the kernel or application cannot break through anyone of these celining without first performing the associated optimization.[5][8] The Roofline plot can be expanded upon three different aspects: communication, adding the bandwidth ceilings; computation, adding the so-called in-core ceilings; and locality, adding the locality walls. Bandwidth ceilingsThe bandwidth ceilings are bandwidth diagonals placed below the idealized peak bandwidth diagonal. Their existence is due to the lack of some kind of memory related architectural optimization, such as cache coherence, or software optimization, such as poor exposure of concurrency (that in turn limit bandwidth usage).[5][8] In-core ceilingsThe in-core ceilings are roofline-like curve beneath the actual roofline that may be present due to the lack of some form of parallelism. These ceilings effectively limit how high performance can reach. Performance cannot exceed an in-core ceiling until the underlying lack of parallelism is expressed and exploited. The ceilings can be also derived from architectural optimization manuals other than benchmarks.[5][8] Locality wallsIf the ideal assumption that arithmetic intensity is solely a function of the kernel is removed, and the cache topology - and therefore cache misses - is taken into account, the arithmetic intensity clearly becomes dependent on a combination of kernel and architecture. This may result in a degradation in performance depending on the balance between the resultant arithmetic intensity and the ridge point. Unlike "proper" ceilings, the resulting lines on the Roofline plot are vertical barriers through which arithmetic intensity cannot pass without optimization. For this reason, they are referenced to as locality walls or arithmetic intensity walls.[5][8] Extension of the modelSince its introduction,[5][8] the model has been further extended to account for a broader set of metrics and hardware-related bottlenecks. Already available in literature there are extensions that take into account the impact of NUMA organization of memory,[3] of out-of-order execution,[9] of memory latencies,[9][10] and to model at a finer grain the cache hierarchy[2][9] in order to better understand what is actually limiting performance and drive the optimization process. Also, the model has been extended to better suit specific architectures and the related characteristics, such as FPGAs.[11] See also{{portal|Software Testing}}
References1. ^{{Cite book|title=Computer Organisation and Design|author=David A.Patterson, John L.Hennessy|page=543}} 2. ^1 {{Cite journal|last=Ilic|first=A.|last2=Pratas|first2=F.|last3=Sousa|first3=L.|date=2014-01-01|title=Cache-aware Roofline model: Upgrading the loft|journal=IEEE Computer Architecture Letters|volume=13|issue=1|pages=21–24|doi=10.1109/L-CA.2013.6|issn=1556-6056}} 3. ^1 {{Cite journal|last=Lorenzo|first=Oscar G.|last2=Pena|first2=Tomás F.|last3=Cabaleiro|first3=José C.|last4=Pichel|first4=Juan C.|last5=Rivera|first5=Francisco F.|date=2014-03-31|title=Using an extended Roofline Model to understand data and thread affinities on NUMA systems|url=http://revistaseug.ugr.es/index.php/amgp/article/view/1992|journal=Annals of Multicore and GPU Programming|language=en|volume=1|issue=1|pages=56–67|issn=2341-3158}} 4. ^{{Cite web|url=https://crd.lbl.gov/departments/computer-science/PAR/research/roofline/|title=Roofline Performance Model|last=|first=|date=|website=|publisher=Lawrence Berkeley National Laboratory|access-date=19 June 2016}} 5. ^1 2 3 4 5 6 7 8 9 {{cite thesis |type=Ph.D. |last=Williams |first=Samuel W. |date=2008 |title=Auto-tuning Performance on Multicore Computers |publisher=University of California at Berkeley}} 6. ^{{Cite book|last=Kourtis|first=Kornilios|last2=Goumas|first2=Georgios|last3=Koziris|first3=Nectarios|date=2008-01-01|title=Optimizing Sparse Matrix-vector Multiplication Using Index and Value Compression|journal=Proceedings of the 5th Conference on Computing Frontiers|series=CF '08|location=New York, NY, USA|publisher=ACM|pages=87–96|doi=10.1145/1366230.1366244|isbn=9781605580777|citeseerx=10.1.1.140.9391}} 7. ^1 2 3 4 5 6 7 {{Cite book|last=Ofenbeck|first=G.|last2=Steinmann|first2=R.|last3=Caparros|first3=V.|last4=Spampinato|first4=D. G.|last5=Püschel|first5=M.|date=2014-03-01|title=Applying the roofline model|journal=2014 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)|pages=76–85|doi=10.1109/ISPASS.2014.6844463|isbn=978-1-4799-3606-9}} 8. ^1 2 3 4 5 6 7 {{Cite journal|last=Williams|first=Samuel|last2=Waterman|first2=Andrew|last3=Patterson|first3=David|date=2009-04-01|title=Roofline: An Insightful Visual Performance Model for Multicore Architectures|journal=Commun. ACM|volume=52|issue=4|pages=65–76|doi=10.1145/1498765.1498785|issn=0001-0782}} 9. ^1 2 {{Cite book|last=Cabezas|first=V. C.|last2=Püschel|first2=M.|date=2014-10-01|title=Extending the roofline model: Bottleneck analysis with microarchitectural constraints|journal=2014 IEEE International Symposium on Workload Characterization (IISWC)|pages=222–231|doi=10.1109/IISWC.2014.6983061|isbn=978-1-4799-6454-3}} 10. ^{{Cite journal|last=Lorenzo|first=O. G.|last2=Pena|first2=T. F.|last3=Cabaleiro|first3=J. C.|last4=Pichel|first4=J. C.|last5=Rivera|first5=F. F.|date=2014-03-26|title=3DyRM: a dynamic roofline model including memory latency information|journal=The Journal of Supercomputing|language=en|volume=70|issue=2|pages=696–708|doi=10.1007/s11227-014-1163-4|issn=0920-8542}} 11. ^{{Cite journal|last=da Silva|first=Bruno|last2=Braeken|first2=An|last3=D'Hollander|first3=Erik H.|last4=Touhafi|first4=Abdellah|date=2013-01-01|title=Performance Modeling for FPGAs: Extending the Roofline Model with High-level Synthesis Tools|journal=Int. J. Reconfig. Comput.|volume=2013|pages=1–10|doi=10.1155/2013/428078|issn=1687-7195}} External links
Available Tools
2 : Software testing|Software optimization |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。