SlideShare una empresa de Scribd logo
1 de 37
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
Accelerate Your C/C++ Applications
with Amazon EC2 F1 Instances
C M P 4 0 2
N o v e m b e r 3 0 , 2 0 1 7
Gadi Hutt – gadi@amazon.com
Kristopher King
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to Expect From This Session
Overview of FPGA Acceleration and Amazon EC2 F1
Fundamentals of Application Accelerations
The C/C++ OpenCL Cloud FPGA Development Flow
Hands on Workshop:
• Get started with the FPGA Developer AMI
• Learn how to run, profile and optimize hardware accelerators
• Build an FFmpeg plugin which transparently accelerates video encoding using the F1 FPGA platform
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CPU: High speed, lower efficiency GPU/FPGA: High throughput, higher efficiency
GPUs and FPGAs provide massive parallelism and higher efficiency than CPUs for
certain categories of applications
More parallelism for higher throughout…
Accelerated Computing Concepts
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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 operations
CPU handles the rest
application
How Application Acceleration Works
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CPU
Application
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
DDR4
Attached
Memory
PCIe
DDR
Controllers
Launch Instance
and Load AFI
Amazon FPGA
Image (AFI)
An F1 instance
can have any
number of AFIs
An AFI can be
loaded into the
FPGA in seconds
Amazon Machine
Image (AMI)
FPGA Acceleration Using F1
EC2
F1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
F1 FPGA Instance Types on AWS
Up to 8 Xilinx UltraScale+ 16nm VU9P FPGA devices in a single instance
Each FPGAs has 4x DDR4 interfaces, with each interface accessing a
16GiB, 72-bit wide, ECC-protected memory, and PCI x16 Gen3 Connectivity
to the host CPU
Instance Size FPGAs DDR4
(GiB)
vCPUs Instance
Memory
(GiB)
NVMe
Instance
Storage (GB)
Network
Bandwidth
f1.2xlarge 1 4 x 16 8 122 1 x 470 Up to 10
Gbps
f1.16xlarge 8 32 x 16 64 976 4 x 940 25 Gbps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud FPGA Accelerations
Genomics
Financial Analytics
Image and Video Processing
Big Data Analytics
Machine Learning
Security
Engineering simulations
Compression
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Discover, Procure, Deploy, and Manage Software in the Cloud
AWS Marketplace
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Scaling with EC2 F1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Global Infrastructure
16 Regions – 42 Availability Zones – 74 Edge Locations
Region & Number of Availability Zones
AWS GovCloud (2) EU
Ireland (3)
US West Frankfurt (3)
Oregon (3) London (2)
Northern California (3)
Asia Pacific
US East Singapore (2)
N. Virginia (6), Ohio (3) Sydney (3), Tokyo (3),
Seoul (2), Mumbai (2)
Canada
Central (2) China
Beijing (2)
South America
São Paulo (3)
Announced Regions
China, France, Hong Kong, Sweden, Bahrain
AWS GovCloud (US-East)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Global Infrastructure
16 Regions – 42 Availability Zones – 74 Edge Locations
F 1 F 1
F 1
Region & Number of Availability Zones
AWS GovCloud (2) EU
Ireland (3)
US West Frankfurt (3)
Oregon (3) London (2)
Northern California (3)
Asia Pacific
US East Singapore (2)
N. Virginia (6), Ohio (3) Sydney (3), Tokyo (3),
Seoul (2), Mumbai (2)
Canada
Central (2) China
Beijing (2)
South America
São Paulo (3)
Announced Regions
China, France, Hong Kong, Sweden, Bahrain
AWS GovCloud (US-East)
F1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The FPGA Developer AMI
Use Xilinx SDx to develop, simulate and deploy your custom FPGA logic
Xilinx SDx for custom logic development Virtual JTAG for interactive debugging
Developing Applications for F1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OpenCL C/C++ Development Flow
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Alternative Development paths
From Our Partners
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The C/C++/OpenCL Development Flow
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Developing and Using AFIs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OpenCL Development Environment
• Develop, profile, debug and deploy
accelerated applications on F1
• Concurrent programming of the
host application and FPGA kernels
• Automatic hardware execution
flows
• Built-in debug, profiling and
performance analysis tools
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The F1 Shell: Abstracting and Securing
FPGA I/Os
The F1 FPGA Shell allows for faster coding of accelerations
by removing the need to develop I/O related and health
monitoring of the FPGA hardware
• Exposes predefined interfaces to integrate the custom
acceleration kernels
• Standard based interfaces, qualified with the hardware
components
• Designed and optimized for ease of use and performance
Custom Kernels
DMA
DDR
AXI Interfaces
Shell
Xilinx VU9P FPGA
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS F1 Platform Model
PCIe
Custom Kernels
DMA
DDR
AXI Interfaces
CPU Xilinx FPGA
Custom Application
Drivers
OpenCL Runtime
OpenCL API
User
Application
Code
AWS F1
Platform
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example Application: Video Encoding
PCIe
Custom Kernels
DMA
DDR
AXI Interfaces
Custom Application
Drivers
OpenCL Runtime
OpenCL API
User
Application
Code
AWS F1
Platform
FFMPEG + Plugin HW HEVC Encoder
CPU Xilinx FPGA
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The Host-Application Execution Stack
A Master-slave model separates application code from
kernel logic implemented in the AFI
Host application submits work to FPGA kernels using
standard OpenCL API
OpenCL runtime and AWS drivers enable the
communication with the FPGA hardware
CPU
Custom Application
Drivers
OpenCL Runtime
OpenCL API
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AFI Creation Flow Overview
Create
Kernels
Compile
Platform
Create
AFI
Create the encrypted
Amazon FPGA Image
Create SDAccel kernels from
C/C++, OpenCL, or RTL
Automatically generate
the FPGA binary
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Creating Kernels from C/C++, OpenCL
Parallel Compiler generates high-performance HW kernels
from OpenCL, C, and C++
Advanced optimizations tuned for Xilinx FPGA devices
• Memory partitioning
• DSP block inferencing
• Loop unrolling, loop pipelining
Creates HW kernel with necessary AXI interfaces
Automatically generates PROJECT_NAME.xo file
SDAccel Compiler
.xo
SDAccel
kernel
C++
Open
CL
C
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compiling the Platform (1/2)
The compiler assembles the FPGA design
Automatically instantiates the kernels and F1 shell
Automatically generates DDR interfaces and interconnect
logic
Makes all the necessary connections
SDAccel Compiler (xocc)
Assembled FPGA Design
AWS F1 Shell
.xo .xo
Interconnect logic
kernelkernel
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compiling the Platform (2/2)
SDAccel runs synthesis and place&route on assembled
FPGA design
Generates FPGA binary (.xclbin)
Multiple iterations might be required to meet timing goals
For best results, Kernels should be designed with
recommendations from the UltraFast Design Methodology
Guide for the Vivado Design Suite
xclbin
SDAccel Compiler (xocc)
AWS F1 Shell
Interconnect logic
kernelkernel
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Creating an Amazon FPGA Image
Xclbin is converted to an encrypted Amazon FPGA
Image (AFI)
AFIs are created and securely stored by an AWS
backend service
Distributable awsxclbin only contains the AFI id
AFI id is used at runtime to download the AFI from
the Vault into the FPGA
Application developers have no access to acceleration
RTL IP awsxclbin
xclbin
id AFI
id AFI
id AFI
Create AFI
AFI
AFI id
AWS AFI Storage
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Developing the Host Application
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Host Application Development Flow
Develop
Compile &
Execute
Profile &
Optimize
Use analysis tools to
optimize application
Setup OpenCL in
host application
Run host application
with FPGA kernels
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
010101010111010101010
101010101010101010100
001010101010101010101
010101010101110101010
101000111100101001111
000101010101010101010
000101000010101011000
101010100100100101010
110001100010101110001
101010100011010101110
101101111100011110000
010001010001111001101
010111101001011010101
001000000101010101110
010001001001010001100
010101101011100101101
010101010101011010100
101010110101010101010
101011100101010100101
010101010110101011001
010101010010101010101
User Application
Code
Developing Application Code
Application written in C/C++, compiled with GCC
OpenCL API used to communicate with FPGA
OpenCL runtime and AWS drivers enable the
communication with the FPGA hardware
Host Application can take many forms
• Standalone executable
• Plugin, shared lib, etc…
• Server for client-server system
FPGA Release
Kernel Execution
FPGA Setup
Kernel Execution
Kernel Execution
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OpenCL Testing and Execution Modes
CPU Emulation Hardware Emulation Hardware Execution
Host application runs with a
C/C++ or OpenCL model of the
Kernels
Host application runs with a
simulated RTL model of the
Kernels
Host application runs with
actual FPGA implementation of
the Kernels
Confirm functional correctness
of the system
Test the host / kernel
integration, get performance
estimates
Confirm system runs correctly
and with desired performance
Fastest turnaround time Best debug capabilities Accurate performance results
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Profiling and Optimization
EC2 F1 OpenCL provides comprehensive debug and analysis
tools to assess health and performance of the system
Profile Rule Checks highlight performance issues and provide
improvement recommendations
Visualize kernel execution and data transfer efficiency
• Host and device events displayed on a common
timeline
• OpenCL API call sequence
• Kernel execution sequence
• FPGA trace data including AXI transactions, kernel
start/stop, etc.
Xilinx FPGAHost CPU
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hands-On Workshop
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Workshop outline
Get started with the FPGA Developer AMI
Connecting to your F1 instance and running hello world
Experience F1 acceleration running Ffmpeg and HEVC encoding
Developing, profiling, and optimizing F1 C/C++/OpenCL applications with SDAccel
Next steps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Workshop and FAQ
Start with introduction module:
https://github.com/awslabs/aws-fpga-app-
notes/blob/master/reInvent17_Developer_Workshop/README.md
FAQ:
Q: Why are precompiled Amazon FPGA images (AFIs) being used in the workshop?
A: To reduce the length of the workshop, we precompiled AFIs and made them public.
Q: Why does the workshop use F1.2xlarge instances?
A: Normally, a developer would use non-F1 instance for development. To avoid switching between
instances during the workshop, we will use F1.2xlarge only.
Q: Why do I need to exit the terminal between modules?
A: Exiting the terminal is a required step that clears the environment variables between modules.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Q&A and What’s Next?
FPGA Accelerated Computing Using Amazon EC2 F1 Instances
Thursday, 5:30 p.m. - Venetian, Level 3
Resources:
Github: https://github.com/aws/aws-fpga
Developer Forum: https://forums.aws.amazon.com/forum.jspa?forumID=243
FPGA Developer AMI:
https://aws.amazon.com/marketplace/pp/B06VVYBLZZ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

Más contenido relacionado

La actualidad más candente

Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech Talks
Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech TalksScaling Redis Workloads with Amazon ElastiCache - AWS Online Tech Talks
Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech TalksAmazon Web Services
 
AWS re:Invent 2017 Recap Webinar - Australia & New Zealand
AWS re:Invent 2017 Recap Webinar - Australia & New ZealandAWS re:Invent 2017 Recap Webinar - Australia & New Zealand
AWS re:Invent 2017 Recap Webinar - Australia & New ZealandAmazon Web Services
 
Deep Dive into AWS Fargate - CON333 - re:Invent 2017
Deep Dive into AWS Fargate - CON333 - re:Invent 2017Deep Dive into AWS Fargate - CON333 - re:Invent 2017
Deep Dive into AWS Fargate - CON333 - re:Invent 2017Amazon Web Services
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...Amazon Web Services
 
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Amazon Web Services
 
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...Amazon Web Services
 
Optimierung Ihrer SAP Infrastruktur mit der AWS Plattform
Optimierung Ihrer SAP Infrastruktur mit der AWS PlattformOptimierung Ihrer SAP Infrastruktur mit der AWS Plattform
Optimierung Ihrer SAP Infrastruktur mit der AWS PlattformAWS Germany
 
Amazon EC2 Foundations - SRV319 - Anaheim AWS Summit
Amazon EC2 Foundations - SRV319 - Anaheim AWS SummitAmazon EC2 Foundations - SRV319 - Anaheim AWS Summit
Amazon EC2 Foundations - SRV319 - Anaheim AWS SummitAmazon Web Services
 
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...Amazon Web Services
 
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...Amazon Web Services
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheAmazon Web Services
 
High Performance Computing (HPC) on AWS 101
High Performance Computing (HPC) on AWS 101High Performance Computing (HPC) on AWS 101
High Performance Computing (HPC) on AWS 101Amazon Web Services
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Arun Gupta
 
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...Amazon Web Services
 

La actualidad más candente (20)

What Can HPC on AWS Do?
What Can HPC on AWS Do?What Can HPC on AWS Do?
What Can HPC on AWS Do?
 
Amazon EC2 Foundations
Amazon EC2 FoundationsAmazon EC2 Foundations
Amazon EC2 Foundations
 
Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech Talks
Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech TalksScaling Redis Workloads with Amazon ElastiCache - AWS Online Tech Talks
Scaling Redis Workloads with Amazon ElastiCache - AWS Online Tech Talks
 
AWS re:Invent 2017 Recap Webinar - Australia & New Zealand
AWS re:Invent 2017 Recap Webinar - Australia & New ZealandAWS re:Invent 2017 Recap Webinar - Australia & New Zealand
AWS re:Invent 2017 Recap Webinar - Australia & New Zealand
 
Deep Dive into AWS Fargate - CON333 - re:Invent 2017
Deep Dive into AWS Fargate - CON333 - re:Invent 2017Deep Dive into AWS Fargate - CON333 - re:Invent 2017
Deep Dive into AWS Fargate - CON333 - re:Invent 2017
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...
Accelerating Development Using Custom Hardware Accelerations with Amazon EC2 ...
 
Hulu Case Study
Hulu Case StudyHulu Case Study
Hulu Case Study
 
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
 
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
 
Optimierung Ihrer SAP Infrastruktur mit der AWS Plattform
Optimierung Ihrer SAP Infrastruktur mit der AWS PlattformOptimierung Ihrer SAP Infrastruktur mit der AWS Plattform
Optimierung Ihrer SAP Infrastruktur mit der AWS Plattform
 
Amazon EC2 Foundations - SRV319 - Anaheim AWS Summit
Amazon EC2 Foundations - SRV319 - Anaheim AWS SummitAmazon EC2 Foundations - SRV319 - Anaheim AWS Summit
Amazon EC2 Foundations - SRV319 - Anaheim AWS Summit
 
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
 
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...
A Day in the Life of a Cloud Network Engineer at Netflix - NET303 - re:Invent...
 
2018 bsc power9 and power ai
2018   bsc power9 and power ai 2018   bsc power9 and power ai
2018 bsc power9 and power ai
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
High Performance Computing (HPC) on AWS 101
High Performance Computing (HPC) on AWS 101High Performance Computing (HPC) on AWS 101
High Performance Computing (HPC) on AWS 101
 
Self Driving Storage
Self Driving StorageSelf Driving Storage
Self Driving Storage
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...
C5 Instances and the Evolution of Amazon EC2 Virtualization - CMP332 - re:Inv...
 

Similar a Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re:Invent 2017

FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...
FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...
FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...Amazon Web Services
 
Announcing Amazon EC2 F1 Instances with Custom FPGAs
Announcing Amazon EC2 F1 Instances with Custom FPGAsAnnouncing Amazon EC2 F1 Instances with Custom FPGAs
Announcing Amazon EC2 F1 Instances with Custom FPGAsAmazon Web Services
 
Deep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingDeep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingAmazon Web Services
 
Deep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingDeep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingAmazon Web Services
 
Introduction to Amazon EC2 F1 Instances
Introduction to Amazon EC2 F1 Instances Introduction to Amazon EC2 F1 Instances
Introduction to Amazon EC2 F1 Instances Amazon Web Services
 
Amazon EC2 Foundations - CMP203 - re:Invent 2017
Amazon EC2 Foundations - CMP203 - re:Invent 2017Amazon EC2 Foundations - CMP203 - re:Invent 2017
Amazon EC2 Foundations - CMP203 - re:Invent 2017Amazon Web Services
 
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...Amazon Web Services
 
AWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAmazon Web Services
 
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksDeep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksAmazon Web Services
 
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018Amazon Web Services
 
Computação de Alta Performance (HPC) na AWS - CMP201 - Sao Paulo Summit
Computação de Alta Performance (HPC) na AWS -  CMP201 - Sao Paulo SummitComputação de Alta Performance (HPC) na AWS -  CMP201 - Sao Paulo Summit
Computação de Alta Performance (HPC) na AWS - CMP201 - Sao Paulo SummitAmazon Web Services
 
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)Amazon Web Services
 
CMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment WorkloadsCMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment WorkloadsAmazon Web Services
 
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...Amazon Web Services
 
AWSome Day Online Conference 2018 - Module 2
AWSome Day Online Conference 2018 -  Module 2AWSome Day Online Conference 2018 -  Module 2
AWSome Day Online Conference 2018 - Module 2Amazon Web Services
 
CMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesCMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesAmazon Web Services
 

Similar a Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re:Invent 2017 (20)

FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...
FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...
FPGA Accelerated Computing Using Amazon EC2 F1 Instances - CMP308 - re:Invent...
 
Announcing Amazon EC2 F1 Instances with Custom FPGAs
Announcing Amazon EC2 F1 Instances with Custom FPGAsAnnouncing Amazon EC2 F1 Instances with Custom FPGAs
Announcing Amazon EC2 F1 Instances with Custom FPGAs
 
Deep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingDeep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated Computing
 
Deep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated ComputingDeep Dive on Amazon EC2 Accelerated Computing
Deep Dive on Amazon EC2 Accelerated Computing
 
Introduction to Amazon EC2 F1 Instances
Introduction to Amazon EC2 F1 Instances Introduction to Amazon EC2 F1 Instances
Introduction to Amazon EC2 F1 Instances
 
Amazon EC2 Foundations - CMP203 - re:Invent 2017
Amazon EC2 Foundations - CMP203 - re:Invent 2017Amazon EC2 Foundations - CMP203 - re:Invent 2017
Amazon EC2 Foundations - CMP203 - re:Invent 2017
 
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...
The Future of Research Computing on AWS - AWS Public Sector Summit Singapore ...
 
AWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWSAWS Compute Evolved Week: High Performance Computing on AWS
AWS Compute Evolved Week: High Performance Computing on AWS
 
SDAccel Design Contest: SDAccel and F1 Instances
SDAccel Design Contest: SDAccel and F1 InstancesSDAccel Design Contest: SDAccel and F1 Instances
SDAccel Design Contest: SDAccel and F1 Instances
 
Core services
Core servicesCore services
Core services
 
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksDeep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
 
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018
Leadership Session: AWS Semiconductor (MFG201-L) - AWS re:Invent 2018
 
Computação de Alta Performance (HPC) na AWS - CMP201 - Sao Paulo Summit
Computação de Alta Performance (HPC) na AWS -  CMP201 - Sao Paulo SummitComputação de Alta Performance (HPC) na AWS -  CMP201 - Sao Paulo Summit
Computação de Alta Performance (HPC) na AWS - CMP201 - Sao Paulo Summit
 
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
 
CMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment WorkloadsCMP213_GPU(G3) Applications in Media and Entertainment Workloads
CMP213_GPU(G3) Applications in Media and Entertainment Workloads
 
PowerAI Deep dive
PowerAI Deep divePowerAI Deep dive
PowerAI Deep dive
 
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...
Rightsizing Your Silicon Design Environment: Elastic Clusters for EDA Workloa...
 
SYCL 2020 Specification
SYCL 2020 SpecificationSYCL 2020 Specification
SYCL 2020 Specification
 
AWSome Day Online Conference 2018 - Module 2
AWSome Day Online Conference 2018 -  Module 2AWSome Day Online Conference 2018 -  Module 2
AWSome Day Online Conference 2018 - Module 2
 
CMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesCMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 Instances
 

Más de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances - CMP402 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances C M P 4 0 2 N o v e m b e r 3 0 , 2 0 1 7 Gadi Hutt – gadi@amazon.com Kristopher King
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What to Expect From This Session Overview of FPGA Acceleration and Amazon EC2 F1 Fundamentals of Application Accelerations The C/C++ OpenCL Cloud FPGA Development Flow Hands on Workshop: • Get started with the FPGA Developer AMI • Learn how to run, profile and optimize hardware accelerators • Build an FFmpeg plugin which transparently accelerates video encoding using the F1 FPGA platform
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CPU: High speed, lower efficiency GPU/FPGA: High throughput, higher efficiency GPUs and FPGAs provide massive parallelism and higher efficiency than CPUs for certain categories of applications More parallelism for higher throughout… Accelerated Computing Concepts
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 operations CPU handles the rest application How Application Acceleration Works
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CPU Application 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 DDR4 Attached Memory PCIe DDR Controllers Launch Instance and Load AFI Amazon FPGA Image (AFI) An F1 instance can have any number of AFIs An AFI can be loaded into the FPGA in seconds Amazon Machine Image (AMI) FPGA Acceleration Using F1 EC2 F1
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. F1 FPGA Instance Types on AWS Up to 8 Xilinx UltraScale+ 16nm VU9P FPGA devices in a single instance Each FPGAs has 4x DDR4 interfaces, with each interface accessing a 16GiB, 72-bit wide, ECC-protected memory, and PCI x16 Gen3 Connectivity to the host CPU Instance Size FPGAs DDR4 (GiB) vCPUs Instance Memory (GiB) NVMe Instance Storage (GB) Network Bandwidth f1.2xlarge 1 4 x 16 8 122 1 x 470 Up to 10 Gbps f1.16xlarge 8 32 x 16 64 976 4 x 940 25 Gbps
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud FPGA Accelerations Genomics Financial Analytics Image and Video Processing Big Data Analytics Machine Learning Security Engineering simulations Compression
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Discover, Procure, Deploy, and Manage Software in the Cloud AWS Marketplace
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud Scaling with EC2 F1
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Global Infrastructure 16 Regions – 42 Availability Zones – 74 Edge Locations Region & Number of Availability Zones AWS GovCloud (2) EU Ireland (3) US West Frankfurt (3) Oregon (3) London (2) Northern California (3) Asia Pacific US East Singapore (2) N. Virginia (6), Ohio (3) Sydney (3), Tokyo (3), Seoul (2), Mumbai (2) Canada Central (2) China Beijing (2) South America São Paulo (3) Announced Regions China, France, Hong Kong, Sweden, Bahrain AWS GovCloud (US-East)
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Global Infrastructure 16 Regions – 42 Availability Zones – 74 Edge Locations F 1 F 1 F 1 Region & Number of Availability Zones AWS GovCloud (2) EU Ireland (3) US West Frankfurt (3) Oregon (3) London (2) Northern California (3) Asia Pacific US East Singapore (2) N. Virginia (6), Ohio (3) Sydney (3), Tokyo (3), Seoul (2), Mumbai (2) Canada Central (2) China Beijing (2) South America São Paulo (3) Announced Regions China, France, Hong Kong, Sweden, Bahrain AWS GovCloud (US-East) F1
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The FPGA Developer AMI Use Xilinx SDx to develop, simulate and deploy your custom FPGA logic Xilinx SDx for custom logic development Virtual JTAG for interactive debugging Developing Applications for F1
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. OpenCL C/C++ Development Flow
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Alternative Development paths From Our Partners
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The C/C++/OpenCL Development Flow
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Developing and Using AFIs
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. OpenCL Development Environment • Develop, profile, debug and deploy accelerated applications on F1 • Concurrent programming of the host application and FPGA kernels • Automatic hardware execution flows • Built-in debug, profiling and performance analysis tools
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The F1 Shell: Abstracting and Securing FPGA I/Os The F1 FPGA Shell allows for faster coding of accelerations by removing the need to develop I/O related and health monitoring of the FPGA hardware • Exposes predefined interfaces to integrate the custom acceleration kernels • Standard based interfaces, qualified with the hardware components • Designed and optimized for ease of use and performance Custom Kernels DMA DDR AXI Interfaces Shell Xilinx VU9P FPGA
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS F1 Platform Model PCIe Custom Kernels DMA DDR AXI Interfaces CPU Xilinx FPGA Custom Application Drivers OpenCL Runtime OpenCL API User Application Code AWS F1 Platform
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Example Application: Video Encoding PCIe Custom Kernels DMA DDR AXI Interfaces Custom Application Drivers OpenCL Runtime OpenCL API User Application Code AWS F1 Platform FFMPEG + Plugin HW HEVC Encoder CPU Xilinx FPGA
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The Host-Application Execution Stack A Master-slave model separates application code from kernel logic implemented in the AFI Host application submits work to FPGA kernels using standard OpenCL API OpenCL runtime and AWS drivers enable the communication with the FPGA hardware CPU Custom Application Drivers OpenCL Runtime OpenCL API
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AFI Creation Flow Overview Create Kernels Compile Platform Create AFI Create the encrypted Amazon FPGA Image Create SDAccel kernels from C/C++, OpenCL, or RTL Automatically generate the FPGA binary
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Creating Kernels from C/C++, OpenCL Parallel Compiler generates high-performance HW kernels from OpenCL, C, and C++ Advanced optimizations tuned for Xilinx FPGA devices • Memory partitioning • DSP block inferencing • Loop unrolling, loop pipelining Creates HW kernel with necessary AXI interfaces Automatically generates PROJECT_NAME.xo file SDAccel Compiler .xo SDAccel kernel C++ Open CL C
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Compiling the Platform (1/2) The compiler assembles the FPGA design Automatically instantiates the kernels and F1 shell Automatically generates DDR interfaces and interconnect logic Makes all the necessary connections SDAccel Compiler (xocc) Assembled FPGA Design AWS F1 Shell .xo .xo Interconnect logic kernelkernel
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Compiling the Platform (2/2) SDAccel runs synthesis and place&route on assembled FPGA design Generates FPGA binary (.xclbin) Multiple iterations might be required to meet timing goals For best results, Kernels should be designed with recommendations from the UltraFast Design Methodology Guide for the Vivado Design Suite xclbin SDAccel Compiler (xocc) AWS F1 Shell Interconnect logic kernelkernel
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Creating an Amazon FPGA Image Xclbin is converted to an encrypted Amazon FPGA Image (AFI) AFIs are created and securely stored by an AWS backend service Distributable awsxclbin only contains the AFI id AFI id is used at runtime to download the AFI from the Vault into the FPGA Application developers have no access to acceleration RTL IP awsxclbin xclbin id AFI id AFI id AFI Create AFI AFI AFI id AWS AFI Storage
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Developing the Host Application
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Host Application Development Flow Develop Compile & Execute Profile & Optimize Use analysis tools to optimize application Setup OpenCL in host application Run host application with FPGA kernels
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 010101010111010101010 101010101010101010100 001010101010101010101 010101010101110101010 101000111100101001111 000101010101010101010 000101000010101011000 101010100100100101010 110001100010101110001 101010100011010101110 101101111100011110000 010001010001111001101 010111101001011010101 001000000101010101110 010001001001010001100 010101101011100101101 010101010101011010100 101010110101010101010 101011100101010100101 010101010110101011001 010101010010101010101 User Application Code Developing Application Code Application written in C/C++, compiled with GCC OpenCL API used to communicate with FPGA OpenCL runtime and AWS drivers enable the communication with the FPGA hardware Host Application can take many forms • Standalone executable • Plugin, shared lib, etc… • Server for client-server system FPGA Release Kernel Execution FPGA Setup Kernel Execution Kernel Execution
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. OpenCL Testing and Execution Modes CPU Emulation Hardware Emulation Hardware Execution Host application runs with a C/C++ or OpenCL model of the Kernels Host application runs with a simulated RTL model of the Kernels Host application runs with actual FPGA implementation of the Kernels Confirm functional correctness of the system Test the host / kernel integration, get performance estimates Confirm system runs correctly and with desired performance Fastest turnaround time Best debug capabilities Accurate performance results
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Profiling and Optimization EC2 F1 OpenCL provides comprehensive debug and analysis tools to assess health and performance of the system Profile Rule Checks highlight performance issues and provide improvement recommendations Visualize kernel execution and data transfer efficiency • Host and device events displayed on a common timeline • OpenCL API call sequence • Kernel execution sequence • FPGA trace data including AXI transactions, kernel start/stop, etc. Xilinx FPGAHost CPU
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hands-On Workshop
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Workshop outline Get started with the FPGA Developer AMI Connecting to your F1 instance and running hello world Experience F1 acceleration running Ffmpeg and HEVC encoding Developing, profiling, and optimizing F1 C/C++/OpenCL applications with SDAccel Next steps
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Workshop and FAQ Start with introduction module: https://github.com/awslabs/aws-fpga-app- notes/blob/master/reInvent17_Developer_Workshop/README.md FAQ: Q: Why are precompiled Amazon FPGA images (AFIs) being used in the workshop? A: To reduce the length of the workshop, we precompiled AFIs and made them public. Q: Why does the workshop use F1.2xlarge instances? A: Normally, a developer would use non-F1 instance for development. To avoid switching between instances during the workshop, we will use F1.2xlarge only. Q: Why do I need to exit the terminal between modules? A: Exiting the terminal is a required step that clears the environment variables between modules.
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Q&A and What’s Next? FPGA Accelerated Computing Using Amazon EC2 F1 Instances Thursday, 5:30 p.m. - Venetian, Level 3 Resources: Github: https://github.com/aws/aws-fpga Developer Forum: https://forums.aws.amazon.com/forum.jspa?forumID=243 FPGA Developer AMI: https://aws.amazon.com/marketplace/pp/B06VVYBLZZ
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!