integrating ompss fpga within eclipse
play

Integrating OmpSs@FPGA within Eclipse Presentation for EclipseCon - PowerPoint PPT Presentation

Integrating OmpSs@FPGA within Eclipse Presentation for EclipseCon 2019 Ruben Cano-Daz and Xavier Martorell Barcelona Supercomputing Center The LEGaTO project has received funding from the European Union's Horizon 2020 research and innovation


  1. Integrating OmpSs@FPGA within Eclipse Presentation for EclipseCon 2019 Ruben Cano-Díaz and Xavier Martorell Barcelona Supercomputing Center The LEGaTO project has received funding from the European Union's Horizon 2020 research and innovation programme under the grant agreement No 780681 15/07/2019 OmpSs@FPGA & Eclipse EclipseCon 2019 1

  2. OmpSs@FPGA • Porting algorithms to IP cores in FPGA #define BS 128 void matrix_multiply (float a[BS][BS], float b[BS][BS],float c[BS][BS]) { // matrix multiplication of two A, B matrices, to accumulate the result on C for (int ia = 0; ia < BS; ++ia) for (int ib = 0; ib < BS; ++ib) { float sum = 0; Kernel for (int ic = 0; ic < BS; ++ic) sum += a[ia][ic] * b[ic][ib]; c[ia][ib] += sum; } } … BS for (i=0; i<NB; i++) NB BS Main program for (j=0; j<NB; j++) NB BS for (k=0; k<NB; k++) BS matrix_multiply (A[i][k], B[k][j], C[i][j]); … OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 2

  3. OmpSs@FPGA • Challenge o Multiple #define BS 128 types of void matrix_multiply(float a[BS][BS], float b[BS][BS],float c[BS][BS]) { FPGA #pragma HLS inline exist int const FACTOR = BS/2; #pragma HLS array_partition variable=a block factor=FACTOR dim=2 #pragma HLS array_partition variable=b block factor=FACTOR dim=1 • Solution Alpha-Data // matrix multiplication of a A*B matrix Alveo for (int ia = 0; ia < BS; ++ia) o AutoVivado for (int ib = 0; ib < BS; ++ib) { #pragma HLS PIPELINE II=1 float sum = 0; for (int id = 0; id < BS; ++id) Xilinx ZCU102 sum += a[ia][id] * b[id][ib]; c[ia][ib] += sum; } Trenz Electronics Zynq U+ } TE0808 XCZU9EG-ES1 Zynq-7000 Family SECO AXIOM Board 4x Cortex-A53 cores + 2x Cortex-A9 cores + FPGA Zynq U+ XCZU9EG-ES2 FPGA (64-bit platforms) (32-bit platforms) OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 3

  4. Outline • Introduction to OmpSs@FPGA • OmpSs integration within Eclipse / Eclipse Che o Autocompletion of directives o OmpSs toolchain on Docker Containers • OmpSs@FPGA toolchain • Evaluation & tracing • Conclusions & future work OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 4

  5. Autocompletion of directives OmpSs/ OpenMP support in Eclipse • Support for OmpSs and OpenMP development in eclipse • Plugins developed • Support for most of the programming models directives and clauses • Including small help descriptions • Based on context, with autocompletion • Integration of the compilation environment • Eclipse Che OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 5

  6. Autocompletion of directives Support in Eclipse OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 6

  7. Compilation for the FPGA Incorporated to Eclipse Che • Eclipse Che is the next version of the IDE environment • Easy administration on distributed environments • Suitable for local installation and server installation • Redesigned and per-stack customizable interface • The compilation is done inside a Docker container • Our Containers • OmpSs compilation • With links to FPGA vendor tools • Xilinx Vivado • Automatic installation from git with a Python script OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 7

  8. Compilation for the FPGA Incorporated to Eclipse Che Contains the per-platform configuration for our Docker image. OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 8

  9. WP4 – IDE Plugin Moving to Eclipse Che All workspaces use our images and our stack configuration. No configuration needed to compile for either platform thanks to our stack. There can be any number of workspaces. Each workspace contains its private projects. The Vivado installation is shared between all workspaces. OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 9

  10. Compilation for the FPGA Incorporated to Eclipse Che • Docker container • Contains preconfigured OmpSs@fpga tools • Mercurium, Nanos, Xtasks, Xdma, Extrae, Papi, Cross Compiler • Increases productivity and helps avoid configuration errors OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 10

  11. Compilation for the FPGA Workspaces • Creation of a workspace • Custom stack selection OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 11

  12. Compilation for the FPGA Workspaces • Using the workspace • Usage is the same as most IDEs • Install new software on the workspace using linux commands on the terminal • Can debug and run remotely using serial port or ssh or any existing linux technology. OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 12

  13. Compilation for the FPGA Compilation environment • Using the workspace • Usage is the same as most IDEs • Install new software on the workspace using linux commands on the terminal • Can debug and run remotely using serial port or ssh or any existing linux technology. OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 13

  14. Current developments • Integration with Theia •Theia is an IDE that runs inside an Eclipse Che workspace •When version 7 of eclipse Che releases, will be che’s default IDE •Is based on the opensource Monaco Editor that Powers Visual Studio Code •It has compatibility with Visual Studio Code Plugins and Extensions OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 14

  15. Current developments • Integration with Theia •Developed plugins Will be compatible with: • Eclipse Che + Theia • Visual Studio Code •Can exploit all the features of the plugin platform •The programmer can install optional or preferred plugins OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 15

  16. Execution environment • Nanos runtime system • Resources available o OMP_NUM_THREADS / NX_GPUS / NX_NUM_FPGAS o Master and workers execute SMP tasks o One representative thread per accelerator • CUDA/OpenCL/FPGA device matrix_multiply • Getting work from the task pool Global thread team o Different scheduling policies o “Implements” policy allows to exploit Task pool parallelism on “all resources” OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 16

  17. Execution environment • Nanos runtime system • Matrix multiplication 2048x2048 single precision o On Xilinx Zynq U+ (4x A53 + FPGA) (*)76.0 Gflop/s • Implements 39.6 o SMP OpenBLAS 26.8 Gflop/s 36.5 (~Sep.2017) o autoVivado on FPGA o Great success 11.7 Gflop/s • 300 MHz on FPGA 3.2 o Outperforms cores • Parallel task creation • New dataflow IP core OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 17

  18. Execution environment • Tracing facilities • 3x256 dataflow IP cores with “implements” and 4 ARM workers o ARM cores do a lot of work (on their possibilities) OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 18

  19. Summary Conclusions • Developed IDE plugin for Eclipse for directives support • Developed docker for automatic compilation on Eclipse Che • Easy distribution of the OmpSs toolchain • Use in Cloud environments OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 19

  20. Summary Future plans • Keep improving the Eclipse/Eclipse Che support • Keep improving the code generation with OmpSs toolchain • Evaluating the possibility to use LLVM OmpSs@FPGA & Eclipse EclipseCon 2019 15/07/2019 20

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