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
Integrated Development Environments (IDE)
PPTX
ProLog (Artificial Intelligence) Introduction
PDF
Introduction to Distributed System
PPTX
Introduction to tcp ip linux networking
PPTX
Learn Python The Hard Way Presentation
PPTX
Introduction to c#
PPTX
Windows vs linux prsentsn
PDF
C programming for problem solving
PPTX
Object oriented and function oriented design
PDF
Principles of-programming-languages-lecture-notes-
PPT
VB.net
PDF
Software project management
PPT
Java features
DOC
Grade 8: Introduction To Java
PPT
Object-oriented concepts
PPTX
Prolog Programming : Basics
PPTX
Software Development Process
PPTX
Software Project Management (SPM)
PPTX
Basic Python Programming: Part 01 and Part 02
PPT
Software Estimation Techniques
 
PPTX
Algorithm Complexity & Big-O Analysis
PPTX
Notification android
PDF
Looking at how Scratch and Python compare
PPTX
Cobol programming language
PPTX
Waterfall Model PPT in Software Engineering
PPTX
Python Tutorial Part 2
PPT
Introduction To C#
PPTX
Problem Formulation in Artificial Inteligence Projects
PPTX
Java on the GPU: Where are we now?
PPTX
GPU Computing: A brief overview

More Related Content

PPTX
Integrated Development Environments (IDE)
PPTX
ProLog (Artificial Intelligence) Introduction
PDF
Introduction to Distributed System
PPTX
Introduction to tcp ip linux networking
PPTX
Learn Python The Hard Way Presentation
PPTX
Introduction to c#
PPTX
Windows vs linux prsentsn
PDF
C programming for problem solving
Integrated Development Environments (IDE)
ProLog (Artificial Intelligence) Introduction
Introduction to Distributed System
Introduction to tcp ip linux networking
Learn Python The Hard Way Presentation
Introduction to c#
Windows vs linux prsentsn
C programming for problem solving

What's hot

PPTX
Object oriented and function oriented design
PDF
Principles of-programming-languages-lecture-notes-
PPT
VB.net
PDF
Software project management
PPT
Java features
DOC
Grade 8: Introduction To Java
PPT
Object-oriented concepts
PPTX
Prolog Programming : Basics
PPTX
Software Development Process
PPTX
Software Project Management (SPM)
PPTX
Basic Python Programming: Part 01 and Part 02
PPT
Software Estimation Techniques
 
PPTX
Algorithm Complexity & Big-O Analysis
PPTX
Notification android
PDF
Looking at how Scratch and Python compare
PPTX
Cobol programming language
PPTX
Waterfall Model PPT in Software Engineering
PPTX
Python Tutorial Part 2
PPT
Introduction To C#
PPTX
Problem Formulation in Artificial Inteligence Projects
Object oriented and function oriented design
Principles of-programming-languages-lecture-notes-
VB.net
Software project management
Java features
Grade 8: Introduction To Java
Object-oriented concepts
Prolog Programming : Basics
Software Development Process
Software Project Management (SPM)
Basic Python Programming: Part 01 and Part 02
Software Estimation Techniques
 
Algorithm Complexity & Big-O Analysis
Notification android
Looking at how Scratch and Python compare
Cobol programming language
Waterfall Model PPT in Software Engineering
Python Tutorial Part 2
Introduction To C#
Problem Formulation in Artificial Inteligence Projects

Similar to GPU Programming with Java

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

More from Kelum Senanayake

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

Recently uploaded

PDF
Agentic AI and AI Agents 20251121.pdf - by Ms. Oceana Wong
PPTX
LYMPHATIC SYSTEM.pptx it includes lymph, lymph nodes, bone marrow, spleen
PPTX
Chapter 3. Pharmaceutical Aids (pharmaceutics)
PDF
“Step-by-Step Fabrication of Bipolar Junction Transistors (BJTs)”
PPTX
Time Series Analysis - Meaning, Definition, Components and Application
PDF
Conferencia de Abertura_Virgilio Almeida.pdf
PDF
ASRB NET 2025 Paper GENETICS AND PLANT BREEDING ARS, SMS & STODiscussion | Co...
PPTX
SEMESTER 5 UNIT- 1 Difference of Children and adults.pptx
PPTX
Anatomy of the eyeball An overviews.pptx
PPTX
DEPED MEMORANDUM 089, 2025 PMES guidelines pptx
PDF
45 ĐỀ LUYỆN THI IOE LỚP 8 THEO CHƯƠNG TRÌNH MỚI - NĂM HỌC 2024-2025 (CÓ LINK ...
PPTX
What are New Features in Purchase _Odoo 18
PPTX
Quarter 3 lesson 2 of English Grade 8.pptx
PDF
UGC NET Paper 1 Syllabus | 10 Units Complete Guide for NTA JRF
PPTX
Declaration of Helsinki Basic principles in medical research ppt.pptx
PDF
*Unit-II A (Elements of Communication & Communication Style Matrix)
PDF
AI Workflows and Workflow Rhetoric - by Ms. Oceana Wong
PDF
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...
PDF
Cattolica University - Lab Generative and Agentic AI - Mario Bencivinni
PPTX
ATTENTION - PART 1.pptx cognitive processes -For B.Sc I Sem By Mrs.Shilpa Hot...
Agentic AI and AI Agents 20251121.pdf - by Ms. Oceana Wong
LYMPHATIC SYSTEM.pptx it includes lymph, lymph nodes, bone marrow, spleen
Chapter 3. Pharmaceutical Aids (pharmaceutics)
“Step-by-Step Fabrication of Bipolar Junction Transistors (BJTs)”
Time Series Analysis - Meaning, Definition, Components and Application
Conferencia de Abertura_Virgilio Almeida.pdf
ASRB NET 2025 Paper GENETICS AND PLANT BREEDING ARS, SMS & STODiscussion | Co...
SEMESTER 5 UNIT- 1 Difference of Children and adults.pptx
Anatomy of the eyeball An overviews.pptx
DEPED MEMORANDUM 089, 2025 PMES guidelines pptx
45 ĐỀ LUYỆN THI IOE LỚP 8 THEO CHƯƠNG TRÌNH MỚI - NĂM HỌC 2024-2025 (CÓ LINK ...
What are New Features in Purchase _Odoo 18
Quarter 3 lesson 2 of English Grade 8.pptx
UGC NET Paper 1 Syllabus | 10 Units Complete Guide for NTA JRF
Declaration of Helsinki Basic principles in medical research ppt.pptx
*Unit-II A (Elements of Communication & Communication Style Matrix)
AI Workflows and Workflow Rhetoric - by Ms. Oceana Wong
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...
Cattolica University - Lab Generative and Agentic AI - Mario Bencivinni
ATTENTION - PART 1.pptx cognitive processes -For B.Sc I Sem By Mrs.Shilpa Hot...

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