SlideShare a Scribd company logo
GPU programming with Java

               Pramuditha Aravinda.
                 Kelum Senanayake.
Outline
   What is GPU.
   CPU vs. GPU Architecture.
   What is Stream processing.
   General Purpose GPU.
   CUDA.
   OpenCL
   Demo
What is GPU
   Graphics processing unit.
       Specialized microprocessor.
   Very efficient at manipulating computer graphics.
   Offloads and accelerates graphics rendering from the
    CPU.
   Dedicated to calculating floating point operations.
   Highly parallel structure.
       More effective for a range of complex algorithms.
   GPU can be present on,
       Video card.
       Motherboard
       CPU die (certain Core Intel CPUs)
CPU vs. GPU Architecture




       The GPU devotes more transistors to data processing.

     GPU : A Highly Parallel, Multithreaded, Manycore Processor
CPU vs. GPU contd…
What is Stream processing
   Is a computer programming paradigm, related to SIMD.
   Allows applications to easily exploit a limited form of
    parallel processing.
   Terminology
       Stream :- A set of data
       Kernel functions :- A series of operations
   Uniform streaming :- One kernel function is applied to all
    elements in the stream.
   Stream processing is driven by a data-centric model
       Image, video and digital signal processing
   Less efficient in general purpose processing with more
    randomized data access (such as databases)
General Purpose GPU
   The GPU is, by design, a stream processing system.
   GPGPU is a programming methodology.
       Modifying algorithms to run on existing GPU hardware
   Capable of performing simple operations on a stream of
    input data with amazing speed.
   Allows software developers to use stream processing on
    non-graphics data.
How hard is it?
   The languages are not very easy to use. Most GPU cards
    still operate on assembly language.
   The process flow is unique. Typically simple branching
    statement, such as if statements, offer such a performance
    penalty that it is often faster to process both conditions.
   The unique Stream-In-Stream-Out design is not typically
    used in CPU programs.
   The need to work with geometric primitives in order to
    push mathematical inputs to the system.
   Rapidly growing community.
Programming GPUs!
   Plenty of interfaces
       Compute Unified Device Architecture (CUDA)
       OpenCL
       OpenGL Shader Language (GLSL)
       DirectX/DirectCompute/HLSL
       ATI Stream
CUDA
   Compute Unified Device Architecture.
   Parallel computing architecture developed by NVIDIA.
   Programmers use C for CUDA.
       C with NVIDIA extensions and certain restrictions.
   Third party wrappers are also available for Python, Perl,
    Fortran, Java, Ruby, Lua, MATLAB and IDL.
   Currently used in,
       SETI@Home
       Distributed Calculations, such as predicting the native
        conformation of proteins
       Accelerated inter conversion of video file formats
       Physical simulations, in particular in fluid dynamics
CUDA Processing Flow
OpenCL
   Open Computing Language.
   Managed by the non-profit technology consortium
    Khronos Group
   Framework for writing programs that execute across
    heterogeneous platforms consisting of CPUs, GPUs, and
    other processors.
   Includes a language (based on C99) for writing kernels.
   APIs to define and then control the platforms.
   Supports both AMD/ATI and NVIDIA.
Programming GPU with Java and
OpenCL
   We need to program using a GPGPU driver
   However most GPGPU drivers are available as a native dll
    only.
   We need another layer to interface to Java runtime.
   Called Java Binding
Java Binding

               UserProgram.class




                    Jocl.jar




                    Jocl.dll




                  OpenCL.dll
Prerequisites - Hardware
   OpenCL capable graphic card.
   nVidea – All CUDA enabled GPU have OpenCL support.
       GeForce 8xxx or higher with 256MB minimum.
       http://www.nvidia.com/object/cuda_gpus.html
   AMD ATI Radeon™ HD 5400 or higher, AMD Radeon™
    HD 6800 series or higher.
       AMD X86 CPU w/ SSE 2.x or later are also supported.
       http://developer.amd.com/gpu/AMDAPPSDK/pages/DriverCom
        patibility.aspx
Prerequisites - Software
   OpenCL driver. – for nVidia GPUs, Usually OpenCL
    drivers are distributed with graphic card drivers.
       http://developer.nvidia.com/object/opencl-download.html
   Java bindings for OpenCL. – Usually there are two parts
       Platform dependent dll. e.g. jocl-windows-x86.dll
       Platform independent jar file. Jocl.jar
       There are few Implementations.
        http://jogamp.org/deployment/webstart/archive/jocl-0.9-b1-
        20101213-windows-i586.zip
   JDK
       http://www.oracle.com/technetwork/java/javase/downloads/ind
        ex.html
Demo Program
   Based on sample program available at
    http://jogamp.org/wiki/index.php/JOCL_Tutorial
GPU Programming with Java
Ad

More Related Content

What's hot (20)

GPU - An Introduction
GPU - An IntroductionGPU - An Introduction
GPU - An Introduction
Dhan V Sagar
 
Unity 2D game development
Unity 2D game developmentUnity 2D game development
Unity 2D game development
The NineHertz
 
Lec04 gpu architecture
Lec04 gpu architectureLec04 gpu architecture
Lec04 gpu architecture
Taras Zakharchenko
 
Gpu
GpuGpu
Gpu
hashim102
 
Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminar
NikhilThorat15
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
Lotfi Messaoudi
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
Alberto Bustamante Reyes
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game Architecture
Amin Babadi
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
Jiann-Fuh Liaw
 
Linux I2C
Linux I2CLinux I2C
Linux I2C
KaidenYu
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
Pouya Pournasir
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
SulemanAliMalik
 
Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
emertxemarketing
 
Fundamentals of Game Design - Ch2
Fundamentals of Game Design - Ch2Fundamentals of Game Design - Ch2
Fundamentals of Game Design - Ch2
Cynthia Marcello
 
GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)
Fatima Qayyum
 
Game Production Stages - eTohum Game Developers Summit - November 2013
Game Production Stages - eTohum Game Developers Summit - November 2013 Game Production Stages - eTohum Game Developers Summit - November 2013
Game Production Stages - eTohum Game Developers Summit - November 2013
barisyaman
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Shaan Alam
 
Graphic card
Graphic cardGraphic card
Graphic card
pranit verma
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
Emertxe Information Technologies Pvt Ltd
 
GPU - An Introduction
GPU - An IntroductionGPU - An Introduction
GPU - An Introduction
Dhan V Sagar
 
Unity 2D game development
Unity 2D game developmentUnity 2D game development
Unity 2D game development
The NineHertz
 
Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminar
NikhilThorat15
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
Lotfi Messaoudi
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game Architecture
Amin Babadi
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
Jiann-Fuh Liaw
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
Pouya Pournasir
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
SulemanAliMalik
 
Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
emertxemarketing
 
Fundamentals of Game Design - Ch2
Fundamentals of Game Design - Ch2Fundamentals of Game Design - Ch2
Fundamentals of Game Design - Ch2
Cynthia Marcello
 
GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)
Fatima Qayyum
 
Game Production Stages - eTohum Game Developers Summit - November 2013
Game Production Stages - eTohum Game Developers Summit - November 2013 Game Production Stages - eTohum Game Developers Summit - November 2013
Game Production Stages - eTohum Game Developers Summit - November 2013
barisyaman
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Shaan Alam
 

Similar to GPU Programming with Java (20)

PE GP.pptx divij watch such subo di bhi vo X7
PE GP.pptx divij watch such subo di bhi vo X7PE GP.pptx divij watch such subo di bhi vo X7
PE GP.pptx divij watch such subo di bhi vo X7
Vanathisekar2
 
GPGPU programming with CUDA
GPGPU programming with CUDAGPGPU programming with CUDA
GPGPU programming with CUDA
Savith Satheesh
 
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
Achieving Improved Performance In Multi-threaded Programming With GPU ComputingAchieving Improved Performance In Multi-threaded Programming With GPU Computing
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
Mesbah Uddin Khan
 
GPU in Computer Science advance topic .pptx
GPU in Computer Science advance topic .pptxGPU in Computer Science advance topic .pptx
GPU in Computer Science advance topic .pptx
HamzaAli998966
 
Stream Processing
Stream ProcessingStream Processing
Stream Processing
arnamoy10
 
Gpu computing-webgl
Gpu computing-webglGpu computing-webgl
Gpu computing-webgl
VisCircle
 
Cuda
CudaCuda
Cuda
Mannu Malhotra
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
gpuprogram_lecture,architecture_designsn
gpuprogram_lecture,architecture_designsngpuprogram_lecture,architecture_designsn
gpuprogram_lecture,architecture_designsn
ARUNACHALAM468781
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
Linaro
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Introduction to GPU Programming
Introduction to GPU ProgrammingIntroduction to GPU Programming
Introduction to GPU Programming
Chakkrit (Kla) Tantithamthavorn
 
GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)
Kohei KaiGai
 
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONSA SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
cseij
 
CUDA
CUDACUDA
CUDA
Areeb Khan
 
Pycon2014 GPU computing
Pycon2014 GPU computingPycon2014 GPU computing
Pycon2014 GPU computing
Ashwin Ashok
 
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the CoupledCpu-GPU ArchitectureRevisiting Co-Processing for Hash Joins on the CoupledCpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
mohamedragabslideshare
 
Cuda
CudaCuda
Cuda
Gopi Saiteja
 
PE GP.pptx divij watch such subo di bhi vo X7
PE GP.pptx divij watch such subo di bhi vo X7PE GP.pptx divij watch such subo di bhi vo X7
PE GP.pptx divij watch such subo di bhi vo X7
Vanathisekar2
 
GPGPU programming with CUDA
GPGPU programming with CUDAGPGPU programming with CUDA
GPGPU programming with CUDA
Savith Satheesh
 
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
Achieving Improved Performance In Multi-threaded Programming With GPU ComputingAchieving Improved Performance In Multi-threaded Programming With GPU Computing
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
Mesbah Uddin Khan
 
GPU in Computer Science advance topic .pptx
GPU in Computer Science advance topic .pptxGPU in Computer Science advance topic .pptx
GPU in Computer Science advance topic .pptx
HamzaAli998966
 
Stream Processing
Stream ProcessingStream Processing
Stream Processing
arnamoy10
 
Gpu computing-webgl
Gpu computing-webglGpu computing-webgl
Gpu computing-webgl
VisCircle
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
gpuprogram_lecture,architecture_designsn
gpuprogram_lecture,architecture_designsngpuprogram_lecture,architecture_designsn
gpuprogram_lecture,architecture_designsn
ARUNACHALAM468781
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
Linaro
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)
Kohei KaiGai
 
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONSA SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
A SURVEY ON GPU SYSTEM CONSIDERING ITS PERFORMANCE ON DIFFERENT APPLICATIONS
cseij
 
Pycon2014 GPU computing
Pycon2014 GPU computingPycon2014 GPU computing
Pycon2014 GPU computing
Ashwin Ashok
 
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the CoupledCpu-GPU ArchitectureRevisiting Co-Processing for Hash Joins on the CoupledCpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
mohamedragabslideshare
 
Ad

More from Kelum Senanayake (10)

Couchbase - Yet Another Introduction
Couchbase - Yet Another IntroductionCouchbase - Yet Another Introduction
Couchbase - Yet Another Introduction
Kelum Senanayake
 
Node.js Introduction
Node.js IntroductionNode.js Introduction
Node.js Introduction
Kelum Senanayake
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GC
Kelum Senanayake
 
A Searchable Symmetric Key Cipher System
A Searchable Symmetric Key Cipher SystemA Searchable Symmetric Key Cipher System
A Searchable Symmetric Key Cipher System
Kelum Senanayake
 
Blind Signature Scheme
Blind Signature SchemeBlind Signature Scheme
Blind Signature Scheme
Kelum Senanayake
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
Security Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in SkypeSecurity Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in Skype
Kelum Senanayake
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 Protocol
Kelum Senanayake
 
Knight's Tour
Knight's TourKnight's Tour
Knight's Tour
Kelum Senanayake
 
How to Share a Secret
How to Share a SecretHow to Share a Secret
How to Share a Secret
Kelum Senanayake
 
Couchbase - Yet Another Introduction
Couchbase - Yet Another IntroductionCouchbase - Yet Another Introduction
Couchbase - Yet Another Introduction
Kelum Senanayake
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GC
Kelum Senanayake
 
A Searchable Symmetric Key Cipher System
A Searchable Symmetric Key Cipher SystemA Searchable Symmetric Key Cipher System
A Searchable Symmetric Key Cipher System
Kelum Senanayake
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
Security Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in SkypeSecurity Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in Skype
Kelum Senanayake
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 Protocol
Kelum Senanayake
 
Ad

Recently uploaded (20)

High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Unit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theoriesUnit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theories
bharath321164
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Diabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomicDiabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomic
Pankaj Patawari
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Unit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theoriesUnit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theories
bharath321164
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Diabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomicDiabetic neuropathy peripheral autonomic
Diabetic neuropathy peripheral autonomic
Pankaj Patawari
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 

GPU Programming with Java

  • 1. GPU programming with Java Pramuditha Aravinda. Kelum Senanayake.
  • 2. Outline  What is GPU.  CPU vs. GPU Architecture.  What is Stream processing.  General Purpose GPU.  CUDA.  OpenCL  Demo
  • 3. What is GPU  Graphics processing unit.  Specialized microprocessor.  Very efficient at manipulating computer graphics.  Offloads and accelerates graphics rendering from the CPU.  Dedicated to calculating floating point operations.  Highly parallel structure.  More effective for a range of complex algorithms.  GPU can be present on,  Video card.  Motherboard  CPU die (certain Core Intel CPUs)
  • 4. CPU vs. GPU Architecture The GPU devotes more transistors to data processing. GPU : A Highly Parallel, Multithreaded, Manycore Processor
  • 5. CPU vs. GPU contd…
  • 6. What is Stream processing  Is a computer programming paradigm, related to SIMD.  Allows applications to easily exploit a limited form of parallel processing.  Terminology  Stream :- A set of data  Kernel functions :- A series of operations  Uniform streaming :- One kernel function is applied to all elements in the stream.  Stream processing is driven by a data-centric model  Image, video and digital signal processing  Less efficient in general purpose processing with more randomized data access (such as databases)
  • 7. General Purpose GPU  The GPU is, by design, a stream processing system.  GPGPU is a programming methodology.  Modifying algorithms to run on existing GPU hardware  Capable of performing simple operations on a stream of input data with amazing speed.  Allows software developers to use stream processing on non-graphics data.
  • 8. How hard is it?  The languages are not very easy to use. Most GPU cards still operate on assembly language.  The process flow is unique. Typically simple branching statement, such as if statements, offer such a performance penalty that it is often faster to process both conditions.  The unique Stream-In-Stream-Out design is not typically used in CPU programs.  The need to work with geometric primitives in order to push mathematical inputs to the system.  Rapidly growing community.
  • 9. Programming GPUs!  Plenty of interfaces  Compute Unified Device Architecture (CUDA)  OpenCL  OpenGL Shader Language (GLSL)  DirectX/DirectCompute/HLSL  ATI Stream
  • 10. CUDA  Compute Unified Device Architecture.  Parallel computing architecture developed by NVIDIA.  Programmers use C for CUDA.  C with NVIDIA extensions and certain restrictions.  Third party wrappers are also available for Python, Perl, Fortran, Java, Ruby, Lua, MATLAB and IDL.  Currently used in,  SETI@Home  Distributed Calculations, such as predicting the native conformation of proteins  Accelerated inter conversion of video file formats  Physical simulations, in particular in fluid dynamics
  • 12. OpenCL  Open Computing Language.  Managed by the non-profit technology consortium Khronos Group  Framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors.  Includes a language (based on C99) for writing kernels.  APIs to define and then control the platforms.  Supports both AMD/ATI and NVIDIA.
  • 13. Programming GPU with Java and OpenCL  We need to program using a GPGPU driver  However most GPGPU drivers are available as a native dll only.  We need another layer to interface to Java runtime.  Called Java Binding
  • 14. Java Binding UserProgram.class Jocl.jar Jocl.dll OpenCL.dll
  • 15. Prerequisites - Hardware  OpenCL capable graphic card.  nVidea – All CUDA enabled GPU have OpenCL support.  GeForce 8xxx or higher with 256MB minimum.  http://www.nvidia.com/object/cuda_gpus.html  AMD ATI Radeon™ HD 5400 or higher, AMD Radeon™ HD 6800 series or higher.  AMD X86 CPU w/ SSE 2.x or later are also supported.  http://developer.amd.com/gpu/AMDAPPSDK/pages/DriverCom patibility.aspx
  • 16. Prerequisites - Software  OpenCL driver. – for nVidia GPUs, Usually OpenCL drivers are distributed with graphic card drivers.  http://developer.nvidia.com/object/opencl-download.html  Java bindings for OpenCL. – Usually there are two parts  Platform dependent dll. e.g. jocl-windows-x86.dll  Platform independent jar file. Jocl.jar  There are few Implementations. http://jogamp.org/deployment/webstart/archive/jocl-0.9-b1- 20101213-windows-i586.zip  JDK  http://www.oracle.com/technetwork/java/javase/downloads/ind ex.html
  • 17. Demo Program  Based on sample program available at http://jogamp.org/wiki/index.php/JOCL_Tutorial