Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Deep Dive on Amazon EC2 F1 Instance - May 2017 AWS Online Tech Talks


Published on

Learning Objectives:
- Learn how to design hardware accelerations to maximize the benefits of F1 instances
- Dive deep on design tools available with F1 instances as part of the Developer AMI, Hardware Development Kit
- Learn how to package and deploy your hardware acceleration code and offer it on the AWS Marketplace

Amazon EC2 F1 is a new compute instance with programmable hardware for application acceleration. With F1, you can directly access custom FPGA hardware on the instance in a few clicks. F1 instances are useful for a range of applications to solve complex science, engineering, and business problems that require high bandwidth, enhanced networking, and very high compute capabilities. In this tech talk, we will go deep on design methodologies that maximize the benefits of hardware acceleration.

Published in: Technology
  • Login to see the comments

Deep Dive on Amazon EC2 F1 Instance - May 2017 AWS Online Tech Talks

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. David Pellerin, Amazon Web Services May 16, 2017 Deep Dive on Amazon EC2 F1 Instance FPGA-Accelerated Computing on AWS F1
  2. 2. Agenda 1. Amazon F1 Instance Architecture and Use-Cases 2. Programming Flow 3. HDK, SDK, and Developer Community 4. Monetizing FPGA Applications in the Cloud 5. Helpful Resources and Getting Started
  3. 3.  Make FPGAs available and affordable at-scale to a large community of developers, and to millions of potential end- customers  Speed the development process by providing cloud-based FPGA development tools  Allow developers to focus on value-adding acceleration, by simplifying the entire application development process  Provide a Marketplace for FPGA applications, providing more choice and easy access for all AWS customers FPGA Acceleration in the AWS Cloud: Goals
  4. 4. EC2 Compute Instance Types M4 General purpose Compute optimized Storage and IO optimized GPU and FPGA accelerated Memory optimized X1 F1 P2 G2 M3 T2 I3 D2 R4 R3 C5 C4 C3 Announced
  5. 5.  Up to 8 Xilinx UltraScale+ 16nm VU9P FPGA devices in a single instance  The f1.16xlarge size provides:  8 FPGAs, each with over 2 million customer-accessible FPGA programmable logic cells and over 5000 programmable DSP blocks  Each of the 8 FPGAs has 4 DDR-4 interfaces, with each interface accessing a 16GiB, 72-bit wide, ECC-protected memory Instance Size FPGAs DDR-4 (GiB) FPGA Link FPGA Direct vCPUs Instance Memory (GiB) NVMe Instance Storage (GB) f1.2xlarge 1 4 x 16 - - 8 122 1 x 470 f1.16xlarge 8 32 x 16 Y Y 64 976 4 x 940 F1 FPGA Instance Types on AWS
  6. 6. module filter1 (clock, rst, strm_in, strm_out) for (i=0; i<NUMUNITS; i=i+1) always@(posedge clock) integer i,j; //index for loops tmp_kernel[j] = k[i*OFFSETX]; FPGA handles compute- intensive, deeply pipelined, hardware-accelerated operations CPU handles the rest Data is transferred to and from the FPGA via PCIe application How FPGA Acceleration Works on AWS
  7. 7. Example F1 Use-Cases
  8. 8.  Driven by customer demand  Compelling, at-scale use-cases:  Image and video processing  Big data and machine learning  Genomics and proteomics  Financial computing  Engineering simulations  And more  Growing partner ecosystem F1 Use Cases and Partners
  9. 9. F1 for Accelerated Analytics Heterogeneous Compute Acceleration for Faster Data Discovery
  10. 10. FPGA Programming Flow
  11. 11. Amazon Machine Image (AMI) Amazon FPGA Image (AFI) EC2 F1 Instance CPU Application on F1 DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory DDR-4 Attached Memory FPGA Link PCIe DDR Controllers Launch Instance and Load AFI Different AFIs can be loaded and reloaded on an F1 instance An AFI can be loaded into the FPGA in less than 1 second FPGA Acceleration Using F1
  12. 12. Development steps Launch the AWS-provided FPGA Developer AMI, which includes all needed FPGA design and programming software The FPGA Developer AMI can be launched using a range of EC2 instance types and sizes, including M4, R4, C4, and T2 (use T2 for design and simulation only, not for synthesis and P&R) Developing Applications for F1 1
  13. 13. The AWS GitHub contains the AWS FPGA HDK and SDK along with detailed examples, scripts, and complete documentation The HDK and SDK enables FPGA developers to create their own custom logic, or to test F1 with preexisting, publicly available AFIs
  14. 14. AWS FPGA Shell FPGA I/O is provided using standard, pre-tested, and secure I/O components, allowing FPGA developers to focus on their differentiating value The FPGA Shell allows for faster coding of core acceleration functions by removing the need to develop I/O related FPGA hardware BlockRAM BlockRAMDDR-4 DDR-4 DDR-4 DDR-4 FPGALink PCIe Abstracting FPGA I/O
  15. 15. FPGA Shell and FPGA Custom Logic Some of the DRAM interface controllers are implemented in the CL rather than the Shell for optimized resource utilization of the FPGA (Allowing higher utilization for the CL place and route region to maximize usable FPGA resources). For those interfaces, the designs and the constraints are provided by AWS and must be instantiated in the CL (by instantiating in the CL design).
  16. 16. Development steps Use Xilinx Vivado and a hardware description language (Verilog or VHDL for RTL, or optionally using the OpenCL framework) with the HDK to describe and simulate your custom FPGA logic Developing Applications for F1 2 Xilinx Vivado for custom logic development Virtual JTAG for interactive debugging
  17. 17. RTL Simulation on AWS Run RTL simulation using the AWS- provided FPGA Developer AMI, or using your choice of simulation tools
  18. 18. RTL Simulation of FPGA Custom Logic
  19. 19. Generate an Amazon FPGA Image (AFI) FPGA Development using Xilinx Vivado on C4, R4, or T2 instances (T2 for design and simulation only, not for synthesis and P&R) Use an instance type and size appropriate for the design phase Securely deploy AFI on one or more F1 instances Developing Applications for F1 – AFI Creation DCP
  20. 20. Development steps After optional simulation, use Vivado to synthesize and place/route the FPGA logic to create an FPGA Design Check Point (DCP) Developing Applications for F1 3
  21. 21. Strategy descriptions: BASIC The basic flow in Vivado, designed to provide a good balance between runtime and Quality of Results (QOR) EXPLORE This is a high-effort flow which is designed to give improved QOR results at the expense of runtime TIMING This flow is designed for more aggressive timing optimization at the expense of runtime and congestion CONGESTION This flow is designed to insert more aggressive whitespace to alleviate routing congestion DEFAULT This is an additional high-effort flow that results in improved QOR results for the example design at the expense of runtime Using Build Strategies to Accelerate Development
  22. 22. Create the Amazon FPGA Image (AFI) Generate an encrypted AFI using the generated DCP
  23. 23. AWS FPGA SDK • SDK includes the software runtime environment required to deploy on F1 instances and perform FPGA debugging • Includes the drivers and tools to manage deployment of the AFIs to the F1 FPGAs, and to manage I/O from the software side
  24. 24. SDK Management options: [A] Shell FPGA Management Tools [B] C-library FPGA Management [C] OpenCL runtime library Runtime code for I/O: [D] FPGA PCIe Lib [E] DMA Interface [F] Interrupt/Event notification [I] OpenCL Installable Client Driver Linux Kernel Driver: [G] DMA Kernel Driver
  25. 25. Launch an F1 instance and load the AFI to the FPGA, using AFI management tools provided in the AWS FPGA Management Tools Developing Applications for F1 4
  26. 26. AWS FPGA SDK - APIs Management APIs fpga-load-local-image, fpga-clear-local-image, fpga-describe-local, fpga-start-virtual-jtag, fpga-get-virtual-led, fpga-set-virtual-dip-switch Runtime driver library APIs
  27. 27. Virtual JTAG for Runtime Debugging
  28. 28. F1 Discussion Forum at
  29. 29. Securing and Monetizing FPGA Applications
  30. 30. Amazon EC2 FPGA Deployment via Marketplace Amazon Machine Image (AMI) Amazon FPGA Image (AFI) AFI is secured, encrypted, dynamically loaded into the FPGA - can’t be copied or downloaded Customers AWS Marketplace Delivering FPGA Partner Solutions on AWS via AWS Marketplace
  31. 31. • Reach millions of potential customers • Deliver innovative solutions worldwide • Offer flexible pricing models • Provide free or low-cost trials for software • Deploy in a customer VPC, or as SaaS • Benefit from easier, more reliable sales operations including billing, monitoring, usage reports, and more What AWS Marketplace Offers for Sellers
  32. 32. Pay-by-the Hour Choose EC2 Instance type Easily change instance types Most products include a free trial period Customer stops and starts at their discretion AWS Marketplace: Pricing Hourly Pricing Model
  33. 33. Customers can budget software spend Sellers can better align sales teams, deliver long-term value and plan recurring revenues Annual or Monthly Pricing Model
  34. 34. Customers leverage existing license assets BYOL-Bring Your Own License
  35. 35. F1 for Machine Learning Inference
  36. 36. Resources F1
  37. 37. Additional Resources AWS F1 details: AWS Marketplace: AWS for Startups: AWS Educate: AWS Research: AWS Public datasets:
  38. 38. Thank you!