leveraging prior knowledge for effective design space
play

Leveraging Prior Knowledge for Effective Design-Space Exploration - PowerPoint PPT Presentation

Universit della Svizzera italiana Leveraging Prior Knowledge for Effective Design-Space Exploration in High-Level Synthesis Authors: Lorenzo Ferretti 1 , Jihye Kwon 2 , Giovanni Ansaloni 1 , Giuseppe Di Guglielmo 2 , Luca Carloni 2 , Laura


  1. Università della Svizzera italiana Leveraging Prior Knowledge for Effective Design-Space Exploration in High-Level Synthesis Authors: Lorenzo Ferretti 1 , Jihye Kwon 2 , Giovanni Ansaloni 1 , Giuseppe Di Guglielmo 2 , Luca Carloni 2 , Laura Pozzi 1 , 1 Università della Svizzera italiana, Lugano, Switzerland 2 Columbia University, New York, United States ESWEEK 2020

  2. Motivation Application Loop unrolling Software Hardware description description for(i;i<10;i++){ HLS A[i] = B[i]*i; } bar(&A,&B); Area Latency 2

  3. Motivation Application Loop unrolling Function inlining Software Hardware description description for(i;i<10;i++){ HLS A[i] = B[i]*i; } bar(&A,&B); Area Latency 3

  4. Motivation Application Loop unrolling Function inlining Software Hardware description description for(i;i<10;i++){ HLS A[i] = B[i]*i; } bar(&A,&B); Area Latency 4

  5. Table of Contents ✓ Motivation ➡ HLS-driven Design Space Exploration • State of the Art • The Idea: Leveraging Prior Knowledge • The Methodology • Signature Encoding • Similarity Evaluation • Inference Process • Results 5

  6. HLS-driven Design Space Exploration (DSE) Goal: get close to the Pareto solutions while minimising the number of synthesis. Design space exploration problem Legend Synthesised configurations Pareto configurations Exhaustive configurations x Area Latency 6

  7. HLS-driven Design Space Exploration (DSE) Goal: get close to the Pareto solutions while minimising the number of synthesis. Design space exploration problem Legend Synthesised configurations Pareto configurations Exhaustive configurations x Area Latency 7

  8. HLS-driven Design Space Exploration (DSE) Goal: get close to the Pareto solutions while minimising the number of synthesis. Design space exploration problem Legend Synthesised configurations Pareto configurations Exhaustive configurations x Area Latency 8

  9. Table of Contents ✓ Motivation ✓ HLS-driven Design Space Exploration ➡ State of the Art for DSE • The Idea: Leveraging Prior Knowledge • The Methodology • Signature Encoding • Similarity Evaluation • Inference Process • Results 9

  10. State of the Art for DSE Two main approaches: • Model-based methodologies MODEL Area Latency C/C++ HLS directives [11] Zhong et al. International Conference on Computer Design, 2014. [12] N. K. Pham et al. Design, Automation Test in Europe Conference Exhibition, 2015. [13] Zhong et al. International Conference on Computer Design, 2016. [14] J. Zhao et al. International Conference on Computer Aided Design, 2017. 10

  11. State of the Art for DSE Two main approaches: • Model-based methodologies • Black-box-based methodologies • Training-based • Refinement-based MODEL Area Latency C/C++ HLS directives Training set [15] Schafer et al. IET Computers & Digital Techniques, 2012. [16] A. Mahapatra et al, Electronic System Level Synthesis Conference, 2014 , 11

  12. State of the Art for DSE Two main approaches: • Model-based methodologies • Black-box-based methodologies • Training-based • Refinement-based MODEL Area Latency C/C++ HLS directives [8] H. Liu et al. Design Automation Conference, 2013. [9] L. Ferretti et al. IEEE Transactions on Emerging Topics in Computing, 2018. [10] L. Ferretti et al. International Conference on Computer Design, 2018. [11] Zhong et al. International Conference on Computer Design, 2014. 12

  13. State of the Art for DSE Two main approaches: • Model-based methodologies • Black-box-based methodologies • Training-based • Refinement-based MODEL Area Latency C/C++ HLS directives [8] H. Liu et al. Design Automation Conference, 2013. [9] L. Ferretti et al. IEEE Transactions on Emerging Topics in Computing, 2018. [10] L. Ferretti et al. International Conference on Computer Design, 2018. [11] Zhong et al. International Conference on Computer Design, 2014. 13 13

  14. Table of Contents ✓ Motivation ✓ HLS-driven Design Space Exploration ✓ State of the Art for DSE ➡ The Idea: Leveraging Prior Knowledge • The Methodology • Signature Encoding • Similarity Evaluation • Inference Process • Results 14

  15. The Idea: Leveraging Prior Knowledge Standard approach P(T, X T ) X T X T X T Set of configurations explored in the DSE of a design T. P(T, X T ) Set of Pareto-optimal configurations identified with the DSE of T. 15

  16. The Idea: Leveraging Prior Knowledge Leveraging Prior Knowledge approach ^ P(T, X T ) = g( . ) S P(T, X T ) X T S X T P(S, X S ) P(T, X T ) X S X S X T X T X S Set of configurations explored in the DSE of a design S. X T Set of configurations explored in the DSE of a design T. P(S, X S ) Set of Pareto-optimal configurations identified with the DSE of S. P(T, X T ) Set of Pareto-optimal configurations identified with the DSE of T. ^ S P(T, X S ) = P(T, X T ) Approximation of the Pareto-optimal configurations of X T S obtained synthesizing the configuration inferred through g( . ) from P(T, X T ). 16

  17. Table of Contents ✓ Motivation ✓ HLS-driven Design Space Exploration ✓ State of the Art for DSE ✓ The Idea: Leveraging Prior Knowledge ➡ The Methodology • Signature Encoding • Similarity Evaluation • Inference Process • Results 17

  18. The Methodology Design & DSEs Target Synthesised Config. Space database configurations designs A C Area Signature Inference HLS encoding process tool Latency B Target Source Similarity signature signature evaluation 18

  19. Table of Contents ✓ Motivation ✓ HLS-driven Design Space Exploration ✓ State of the Art for DSE ✓ The Idea: Leveraging Prior Knowledge ✓ The Methodology ➡ Signature Encoding • Similarity Evaluation • Inference Process • Results 19

  20. The Methodology: Signature Encoding A DSE is characterized with a simplified compact representation that abstracts the specification (code) and the associated configurations (set of applied directives). Signature encoding : Specification Encoding & Configuration Space Descriptor The Specification Encoding (SE) is a The Configuration Space Descriptor simplified representation (CSD) describes the user-defined of the original code describing those configuration space indicating the set of aspects of an HLS-application that can be optimisations type and values considered targeted by HLS directives. for the DSE. 20

  21. The Methodology: Signature Encoding Specification Encoding (SE) : simplified representation of the original code automatically generated trough a compiler pass with LLVM. Specification Encoding symbols: void last_step_scan(int bucket[BUCKETSIZE], int sum[SCAN_RADIX]) { int radixID, i, bucket_indx; Functions —> F • last_1:for (radixID=0; radixID<SCAN_RADIX; radixID++) { Function parameter passed by value—> V • last_2:for (i=0; i<SCAN_BLOCK; i++) { Function parameter passed by reference —> P • bucket_indx = radixID * SCAN_BLOCK + i; Arrays definition or declaration—> A • bucket[bucket_indx] = bucket[bucket_indx] + sum[radixID]; Structs definition or declaration —> S • } Loops —> L • } Load operations (e.g. a = Array[0]) —> R • } Store operations (e.g Array[0] = a) —> W • Function call —> C#<function_name># • LLVM Scope —> {} • pass F{PP}L{L{RRW}} Running Example 21

  22. The Methodology: Signature Encoding Configuration Space Descriptor (CSD) : a DSL is created to describe the optimisations type and values considered for the DSE. A CSD defines entirely the user-defined configuration space. void last_step_scan(int bucket[BUCKETSIZE], int sum[SCAN_RADIX]) { Example of CSD: int radixID, i, bucket_indx; resource;last_step_scan;bucket;{RAM_2P_BRAM} last_1:for (radixID=0; radixID<SCAN_RADIX; radixID++) { resource;last_step_scan;sum;{RAM_2P_BRAM} last_2:for (i=0; i<SCAN_BLOCK; i++) { array_partition;last_step_scan;bucket;1; {cyclic,block};{1->512,pow_2} bucket_indx = radixID * SCAN_BLOCK + i; array_partition;last_step_scan;sum;1; bucket[bucket_indx] = bucket[bucket_indx] + sum[radixID]; {cyclic,block};{1->128,pow_2} } unroll;last_step_scan;last_1;{1->128,pow_2} } unroll;last_step_scan;last_2;{1,2,4,8,16} } clock;{10} Directive type Location Set of directive values Knob Running Example 22

  23. Table of Contents ✓ Motivation ✓ HLS-driven Design Space Exploration ✓ State of the Art for DSE ✓ The Idea: Leveraging Prior Knowledge ✓ The Methodology ✓ Signature Encoding ➡ Similarity Evaluation • Inference Process • Results 23

  24. The Methodology: Similarity Evaluation Similarity Evaluation : in order to identify the proper source for the inference process the similarity among a target DSE and the available source is calculated. The similarity function ( Sim ) is given by a linear combination of Signature Encoding similarity ( Sim SE ) and Configuration Space Descriptor similarity ( Sim CSD ). Sim = α Sim SE + (1 − α ) Sim CSD α ∈ [0,1] Sim SE = LCS ( SE T , SE S ) Sim CSD = 1 − [ I Δ ( K i , M T , S ( K i ))/ D MAX ] 1 ∑ I i =1 | K i | Z | K j | ∑ ∑ | k n , z , k m , z | 2 m =1 | δ ( k n , k m ) | ) 2 Δ ( K i , K j ) = ( min k n ∈ K i , k m ∈ K j δ ( k n , k m ) = n =1 z =1 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend