QUALCOMM Incorporated · NASDAQ:QCOM

QUALCOMM — Technical Presentation (May 2023)

29 slides from QUALCOMM's technical presentation, May 9, 2023

  1. Slide 1: Advanced compilation technology for the AI stack

    Slide 1: Advanced compilation technology for the AI stack

    May 9, 2023 Advanced compilation technology for the AI stack Benoît Meister Principal Engineer Qualcomm Technologies, Inc. @QCOMResearch Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.

  2. Slide 2: Taking advantage of parallel processing for power efficiency

    Slide 2: Taking advantage of parallel processing for power efficiency

    var1 var2 Optimized code (sample) FC var3 void subgraph_3_1(float (*__restrict__ var)[1024], for (j = 0; j <= 15; j++) { float (*__restrict__ var_2_)[1024], int k; float*__restrict__ var_3_, for (k = 0; k <= 127; k++) { add float (*__restrict__ T_multiply)[4096]) int i1; { rv_vstore_f32t16(T_dense_c

  3. Slide 3: Today's agenda

    Slide 3: Today's agenda

    Today’s agenda The need for improved AI compilers Advancements with polyhedral compilation Our leading compiler research General directions Q&A 3

  4. Slide 4: AI is being used all around us

    Slide 4: AI is being used all around us

    Smartphone Smart homes Video conferencing Autonomous vehicles Smart factories Extended reality Smart cities Video monitoring AI is being used all around us increasing productivity, enhancing collaboration, and transforming industries 4

  5. Slide 5: AI is being powered by the explosive growth of deep neural networks

    Slide 5: AI is being powered by the explosive growth of deep neural networks

    2025: N = 100T = 1014 Deep neural networks 1014 2021: Extremely large are energy hungry 12 10 neural networks (N =1.6T) 2017: Very large neural networks (N =137B) and growing fast 1010 Weight parameter count 2013: Google/Y! 108 (N=+/- 1B) AI is being powered by the explosive 106 growth of deep neura

  6. Slide 6: The challenge of AI workloads

    Slide 6: The challenge of AI workloads

    The challenge of Constrained mobile AI workloads environment Very compute Must be thermally efficient intensive for sleek, ultra-light designs Large, complicated neural network models Complex Requires long battery concurrencies life for all-day use Real-time Power and thermal efficiency are essentia

  7. Slide 7: All optimization cannot be done manually

    Slide 7: All optimization cannot be done manually

    Platform type: CPU, GPU, AI core, etc. Constraints: Static vs Latency vs. dynamic All optimization throughput cannot be Type: done manually Transformer, convolutional residual, custom, COMBINATORIAL Device sharing new models Optimization techniques & layers FACTORS need to scale with the explosion o

  8. Slide 8: Holistic power efficiency research

    Slide 8: Holistic power efficiency research

    Conditional Quantization compute Learning to reduce bit-precision while keeping Learning to execute only desired accuracy parts of a large inference model based on the input Holistic power efficiency research Multiple axes to shrink Neural AI models and efficiently architecture run them on hardware

  9. Slide 9: What is a compiler?

    Slide 9: What is a compiler?

    What is a compiler? Source Machine Executable code description Compiler code Improvement in user Main coding effort challenges Before: • Match C semantics Executable Machine code 20th Single core (assembly) with core instructions code C,C++, etc. processor Compiler efficiently century (e.g. 80286) A

  10. Slide 10: The need for parallelism and data locality

    Slide 10: The need for parallelism and data locality

    The need for parallelism and Qualcomm Hexagon Processor Bus Intf data locality Scalar Processor Memory Processing AXI / Bus Unit VLIW Use all the processing elements, I$ Avoid back-and-forths avoid data transfers between HW L2$ control L2$ remote and local memories Multi-threaded DMA Transfer data w

  11. Slide 11: Parallelism and data locality in code

    Slide 11: Parallelism and data locality in code

    Parallelism and data locality in code Illustrated on a BERT language model subgraph optimized by the Qualcomm Polyhedral Mapper void subgraph_3_1(float (*__restrict__ var)[1024], for (int j = 0; j <= 15; j++) { float (*__restrict__ var_2_)[1024], for (int k = 0; k <= 127; k++) { float*__restrict__ v

  12. Slide 12: The Qualcomm Polyhedral Mapper

    Slide 12: The Qualcomm Polyhedral Mapper

    The Qualcomm Polyhedral Mapper Qualcomm Technologies’ polyhedral approach to AI model optimization

  13. Slide 13: How we optimize AI models: the Qualcomm Polyhedral Mapper

    Slide 13: How we optimize AI models: the Qualcomm Polyhedral Mapper

    How we optimize AI models: the Qualcomm Polyhedral Mapper Data/computation space Nodes Accelerators (e.g. Snapdragon) Cores (e.g., Threads Data layout Vectors Hexagon Tensor (e.g., Hexagon Vector Processor) Extension) AI code is repeated computations Model the loops as a polyhedron 𝑖≥1 AI Optimized

  14. Slide 14: Bird's eye view of polyhedral AI compiler optimizations

    Slide 14: Bird's eye view of polyhedral AI compiler optimizations

    Partitions the computations Determines data sets Exposes parallel, into chunks and distributes to be transferred tileable loops them to PEs Transfers them using Optimizes data locality Chunks fit in local memories wide DMA operations Affine Tiling & Memory promotion & scheduling placement DMA genera

  15. Slide 15: Challenge: AI compilers need to grow in three different directions

    Slide 15: Challenge: AI compilers need to grow in three different directions

    Hardware targets & features Better performance through a better use of the hardware platform Vectorization DMA generation/optimization Tiling Footprint-conscious scheduling Multi-dimensional placement Multi-buffering Event-driven tasks Challenge: AI compilers need to grow in three different directio

  16. Slide 16: Hierarchical mapping optimization

    Slide 16: Hierarchical mapping optimization

    Hierarchical mapping optimization Improving tractability of polyhedral optimization for deep PE hierarchies

  17. Slide 17: Model evolutions and tractability properties

    Slide 17: Model evolutions and tractability properties

    Poor Good tractability tractability Properties MOSTLY EXPONENTIAL POLYNOMIAL QUADRATIC CONSTANT Dimension Number of constraints Number of (e.g. # nested loops) (e.g. # loop bounds) statements Size of the inputs, activations, weights Model evolutions HIGHER-DIMENSIONAL COMPUTATIONS DEEPER MODEL WIDER

  18. Slide 18: Hierarchical mapping optimization addresses tractability issues to scale polyhedral compilation

    Slide 18: Hierarchical mapping optimization addresses tractability issues to scale polyhedral compilation

    Data/computation space Computation is Nodes decomposed to each PE level using tiling For a set of n nested loops, Accelerators (e.g. Snapdragon) each tiling can add up to n loop Cores (e.g. HTP) Threads Local memory Vectors dimensions and 2*n constraints (e.g. HVX) for i0 in [1, nti0] for j0 in [1,

  19. Slide 19: Focalization on a particular tiling level with loop and data transformations

    Slide 19: Focalization on a particular tiling level with loop and data transformations

    Loop transformations Data transformations Full tile Partial tile Look at full tiles: Map tile data to a virtual space where accessed data Omit partial-tile boundaries regions are independent from other loop indices 𝑗! Bounds independent from 𝑖! , 𝑗! 𝑗! ≤ 𝑛 𝐴[𝑔(𝑖! , 𝑗! )] 𝐴[𝑔(𝑖! , 𝑗! )]…

  20. Slide 20: Using focalization, AI compile time reduces significantly

    Slide 20: Using focalization, AI compile time reduces significantly

    2-level focalization Focalised compilation Compilation time (s) Reference Using focalization, AI compile time reduces significantly Fully-connected layer Doitgen Successful on a broad Focalised compilation Focalised compilation Compilation time (s) Compilation time (s) Reference Reference class of p

  21. Slide 21: Auto-vectorization

    Slide 21: Auto-vectorization

    Auto-vectorization In the Qualcomm Polyhedral Mapper

  22. Slide 22: Cooperative optimization between polyhedral and classical optimizations

    Slide 22: Cooperative optimization between polyhedral and classical optimizations

    Qualcomm Polyhedral Mapper High-level optimization of vector operations: Polyhedral optimizer • # of lanes • Base address, stride Front-ends: C, TVM, Tensorflow, … Classical optimizations Generation of vector intrinsics Compiler runtime Separation of concerns: Polyhedral Mapper finds Underlying comp

  23. Slide 23: By automating vectorization, AI compiler allows programmers to write fewer lines of code

    Slide 23: By automating vectorization, AI compiler allows programmers to write fewer lines of code

    Auto-optimized Transposed LayerNorm with the Qualcomm Polyhedral Mapper By automating vectorization, 32.2% of hand-tuned performance AI compiler allows programmers to write fewer lines of code and get substantial 620x speedup over sequential performance performance 55.4 #optimized LOCs / #original L

  24. Slide 24: We are solving these challenges with polyhedral AI compilers

    Slide 24: We are solving these challenges with polyhedral AI compilers

    Hardware targets & features Better performance through a better use of the hardware platform Vectorization DMA generation/optimization We are Tiling Footprint-conscious scheduling solving Multi-dimensional placement Event-driven tasks Multi-buffering these challenges with Application domain Tractabi

  25. Slide 25: Broad range of research directions for AI compiler

    Slide 25: Broad range of research directions for AI compiler

    User empowerment & productivity AI-augmentation of compilers Tools to optimize time to market Train models to make of user applications program optimization decisions Scale AI up to larger graphs Heterogeneous computing Efficiently exploit global Fully utilize the Snapdragon graph structure computin

  26. Slide 26: Qualcomm AI Studio

    Slide 26: Qualcomm AI Studio

    AI Frameworks AI Runtimes Qualcomm® Neural Processing SDK TF Lite Micro Direct ML TF Lite Qualcomm® AI Engine Direct Qualcomm AI Studio Math Libraries Compilers Virtual platforms Profilers & Debuggers Programming Languages Core Libraries System Interface SoC, accelerator drivers Emulation Support 26

  27. Slide 27: Improved AI compilers are key to making machine learning ubiquitous

    Slide 27: Improved AI compilers are key to making machine learning ubiquitous

    Improved AI compilers are key to making machine learning ubiquitous Qualcomm AI Research has achieved state-of-the-art results in AI compiler We are enabling AI models to scale across a variety of use cases and run efficiently . Qualcomm AI Research is an initiative of Qualcomm Technologies, Inc 27

  28. Slide 28: Questions

    Slide 28: Questions

    Questions Connect with us www.qualcomm.com/research/ www.qualcomm.com/news/onq @QCOMResearch artificial-intelligence www.youtube.com/c/QualcommResearch www.slideshare.net/qualcommwirelessevolution 28

  29. Slide 29: Thank you

    Slide 29: Thank you

    Thank you Nothing in these materials is an offer to sell any of the components References in this presentation to “Qualcomm” may mean Qualcomm Incorporated, or devices referenced herein. Qualcomm Technologies, Inc., and/or other subsidiaries or business units within the Qualcomm corporate structure,

Source: Internet Archive copy of qualcomm.com

More decks from QUALCOMM Incorporated

All 208 QUALCOMM decks