Movatterモバイル変換


[0]ホーム

URL:


Kelum Senanayake, profile picture
Uploaded byKelum Senanayake
16,662 views

GPU Programming with Java

The document provides an overview of GPU programming using Java, focusing on the distinction between GPU and CPU architectures, stream processing, and general-purpose GPU (GPGPU) techniques. It discusses programming interfaces such as CUDA and OpenCL, including prerequisites for hardware and software needed to implement GPU programming with Java. Additionally, it highlights challenges related to GPU programming and references resources for demo programs.

In this document
Powered by AI

An introduction to GPU programming in Java by Pramuditha Aravinda and Kelum Senanayake, outlining the session's content.

Covers GPU basics, its architecture, and the advantages of GPUs over CPUs in processing tasks, especially in parallel processing.

Details the stream processing paradigm and its relation to GPU usage, emphasizing how GPGPU modifies algorithms for efficient processing.

Discusses the complexity of programming GPUs with various interfaces like CUDA, OpenCL, and the benefits of accessing parallelism.

Introduces CUDA architecture, usage scenarios and its benefits for developers in scientific computations and simulations.

Explains OpenCL, its cross-platform capabilities, and the need for Java bindings to interface with OpenCL in GPU programming.

Lists the necessary hardware (OpenCL capable GPUs) and software (OpenCL drivers, Java bindings) required for setting up GPU programming.

References a demo program based on available JOCL tutorials to illustrate GPU programming concepts.

Embed presentation

Downloaded 221 times
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 andOpenCL   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

Recommended

PPTX
Operating system 30 preemptive scheduling
PPT
CPU Scheduling Algorithms
PPTX
Process state in OS
PPT
02. chapter 3 lexical analysis
PPT
Scheduling algorithms
PPTX
Stack organization
PPTX
queue & its applications
PPT
Compiler Design Unit 1
PDF
Code optimization in compiler design
PPTX
PPT
Compiler Design
PPTX
Operating system 18 process creation and termination
PDF
Booth and bit pair encoding
PDF
Heap and heapsort
PPTX
Loops in Python
PPT
Peterson Critical Section Problem Solution
PDF
Semaphores
PPT
Computer architecture
PPTX
Operating system critical section
PPTX
Asynchronous data transfer
PPTX
Inter Process Communication
PPTX
Video display devices
PPTX
Process scheduling
PPTX
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
PPTX
Cs1123 3 c++ overview
PPTX
Nehalem (microarchitecture)
PPT
Microinstruction sequencing new
PDF
Introduction to GPU Programming
PPTX
Graphics processing unit ppt

More Related Content

PPTX
Operating system 30 preemptive scheduling
PPT
CPU Scheduling Algorithms
PPTX
Process state in OS
PPT
02. chapter 3 lexical analysis
PPT
Scheduling algorithms
PPTX
Stack organization
PPTX
queue & its applications
Operating system 30 preemptive scheduling
CPU Scheduling Algorithms
Process state in OS
02. chapter 3 lexical analysis
Scheduling algorithms
Stack organization
queue & its applications

What's hot

PPT
Compiler Design Unit 1
PDF
Code optimization in compiler design
PPTX
PPT
Compiler Design
PPTX
Operating system 18 process creation and termination
PDF
Booth and bit pair encoding
PDF
Heap and heapsort
PPTX
Loops in Python
PPT
Peterson Critical Section Problem Solution
PDF
Semaphores
PPT
Computer architecture
PPTX
Operating system critical section
PPTX
Asynchronous data transfer
PPTX
Inter Process Communication
PPTX
Video display devices
PPTX
Process scheduling
PPTX
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
PPTX
Cs1123 3 c++ overview
PPTX
Nehalem (microarchitecture)
PPT
Microinstruction sequencing new
Compiler Design Unit 1
Code optimization in compiler design
Compiler Design
Operating system 18 process creation and termination
Booth and bit pair encoding
Heap and heapsort
Loops in Python
Peterson Critical Section Problem Solution
Semaphores
Computer architecture
Operating system critical section
Asynchronous data transfer
Inter Process Communication
Video display devices
Process scheduling
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
Cs1123 3 c++ overview
Nehalem (microarchitecture)
Microinstruction sequencing new

Similar to GPU Programming with Java

PDF
Introduction to GPU Programming
PPTX
Graphics processing unit ppt
PPT
NVIDIA CUDA
PPTX
GPU in Computer Science advance topic .pptx
PDF
Challenges in GPU compilers
PPTX
gpuprogram_lecture,architecture_designsn
PPTX
Introduction to Accelerators
PPTX
GPU Computing: A brief overview
PPTX
SeaJUG 5 15-2018
PPT
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
PDF
Newbie’s guide to_the_gpgpu_universe
PDF
Compute API –Past & Future
PDF
Using GPUs to handle Big Data with Java by Adam Roberts.
PPTX
lecture11_GPUArchCUDA01.pptx
PPT
Cuda intro
PDF
Computing using GPUs
PPT
Lecture2 cuda spring 2010
PPTX
Java on the GPU: Where are we now?
PDF
Open CL For Haifa Linux Club
PDF
Introduction to OpenCL By Hammad Ghulam Mustafa
Introduction to GPU Programming
Graphics processing unit ppt
NVIDIA CUDA
GPU in Computer Science advance topic .pptx
Challenges in GPU compilers
gpuprogram_lecture,architecture_designsn
Introduction to Accelerators
GPU Computing: A brief overview
SeaJUG 5 15-2018
Achieving Improved Performance In Multi-threaded Programming With GPU Computing
Newbie’s guide to_the_gpgpu_universe
Compute API –Past & Future
Using GPUs to handle Big Data with Java by Adam Roberts.
lecture11_GPUArchCUDA01.pptx
Cuda intro
Computing using GPUs
Lecture2 cuda spring 2010
Java on the GPU: Where are we now?
Open CL For Haifa Linux Club
Introduction to OpenCL By Hammad Ghulam Mustafa

More from Kelum Senanayake

PDF
The NFS Version 4 Protocol
PDF
Couchbase - Yet Another Introduction
PDF
How to Share a Secret
PDF
Node.js Introduction
PDF
Blind Signature Scheme
PDF
Knight's Tour
PDF
A Searchable Symmetric Key Cipher System
PDF
EJB 3.0 - Yet Another Introduction
PDF
What you need to know about GC
PDF
Security Risks & Vulnerabilities in Skype
The NFS Version 4 Protocol
Couchbase - Yet Another Introduction
How to Share a Secret
Node.js Introduction
Blind Signature Scheme
Knight's Tour
A Searchable Symmetric Key Cipher System
EJB 3.0 - Yet Another Introduction
What you need to know about GC
Security Risks & Vulnerabilities in Skype

Recently uploaded

PDF
Risk Management and Regulatory Compliance - by Ms. Oceana Wong
PPTX
ATTENTION - PART 1.pptx cognitive processes -For B.Sc I Sem By Mrs.Shilpa Hot...
PPTX
The hidden treasures Grade 5 Story with Motive Questions.pptx
PDF
বাংলাদেশ অর্থনৈতিক সমীক্ষা - ২০২৫ with Bookmark.pdf
PDF
Digital Electronics – Registers and Their Applications
PDF
Multimodal and Multimedia AI - by Ms. Oceana Wong
PPTX
SEMESTER 5 UNIT- 1 Difference of Children and adults.pptx
PPTX
Prelims - History and Geography Quiz - Around the World in 80 Questions - IITK
PPTX
Finals - History and Geography Quiz - Around the World in 80 Questions - IITK
PDF
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...
PDF
AI Chatbots and Prompt Engineering - by Ms. Oceana Wong
PDF
“Step-by-Step Fabrication of Bipolar Junction Transistors (BJTs)”
PPTX
What are New Features in Purchase _Odoo 18
PDF
Conferencia de Abertura_Virgilio Almeida.pdf
PDF
LH_Lecture Note on Spices , AI And Importance in Human Life.pdf
PPTX
Photography Pillar 1 The Subject PowerPoint
PPTX
General Wellness & Restorative Tonic: Draksharishta
PPTX
A Presentation of PMES 2025-2028 with Salient features.pptx
PPTX
Time Series Analysis - Method of Simple Moving Average 3 Year and 4 Year Movi...
PPTX
Quarter 3 lesson 2 of English Grade 8.pptx
Risk Management and Regulatory Compliance - by Ms. Oceana Wong
ATTENTION - PART 1.pptx cognitive processes -For B.Sc I Sem By Mrs.Shilpa Hot...
The hidden treasures Grade 5 Story with Motive Questions.pptx
বাংলাদেশ অর্থনৈতিক সমীক্ষা - ২০২৫ with Bookmark.pdf
Digital Electronics – Registers and Their Applications
Multimodal and Multimedia AI - by Ms. Oceana Wong
SEMESTER 5 UNIT- 1 Difference of Children and adults.pptx
Prelims - History and Geography Quiz - Around the World in 80 Questions - IITK
Finals - History and Geography Quiz - Around the World in 80 Questions - IITK
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...
AI Chatbots and Prompt Engineering - by Ms. Oceana Wong
“Step-by-Step Fabrication of Bipolar Junction Transistors (BJTs)”
What are New Features in Purchase _Odoo 18
Conferencia de Abertura_Virgilio Almeida.pdf
LH_Lecture Note on Spices , AI And Importance in Human Life.pdf
Photography Pillar 1 The Subject PowerPoint
General Wellness & Restorative Tonic: Draksharishta
A Presentation of PMES 2025-2028 with Salient features.pptx
Time Series Analysis - Method of Simple Moving Average 3 Year and 4 Year Movi...
Quarter 3 lesson 2 of English Grade 8.pptx

GPU Programming with Java

  • 1.
    GPU programming withJava 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. GPUArchitecture The GPU devotes more transistors to data processing. GPU : A Highly Parallel, Multithreaded, Manycore Processor
  • 5.
    CPU vs. GPUcontd…
  • 6.
    What is Streamprocessing 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 isit? 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
  • 11.
  • 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 withJava andOpenCL 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

[8]ページ先頭

©2009-2025 Movatter.jp