HPP (CUDA) Seminar


Hello My Past-Present-Future Students,

[ You may find many similarities in my previous drafts of OpenGL and This draft, but please read the complete draft carefully, because there are changes at all the important places! ]

The lengthiness of this document will help me and you to avoid “expectation misunderstandings” and will filter the correct audience for this seminar. Especially new students who don’t know me or my teaching style.

So lets begin . . . . .

Introduction : Important. Don’t skip. It will tell you “why?”
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I had previously announced my upcoming 3 seminars :

01) Introduction to OpenGL(Levels I, II & III)
02) Introduction to CUDA ( and few other “Heterogeneous Parallel Computing [HPP] paradigms ).
03) Introduction to ARM Programming (ARMv7 32 Bit Architecture ).

Out of these 3, the first “Introduction to OpenGL” seminar has recently ended successfully, both by numbers and by satisfaction ( Ask anybody who did it ). People said the success was ‘overwhelming’. This seminar was in 3 parts each of 2 days.

Now it's time for the second of the announced seminars - “Introduction to Heterogeneous Parallel Computing” which will involve CUDA and others.

Those who have attended any of my previous Multi-OS workshops, already know about the MAGIC of OpenGL and CUDA, which lifted them from their seats to give an honest standing ovation and a thundering applaud. Obviously, all credits go to fantastic technologies like OpenGL, GP-GPU, CUDA and HPP. I am just a coder who tried to code that fantasy.

Almost all written feedbacks of the Multi-OS Seminar, from the past 5-10 years, have been earnestly asking me to start teaching OpenGL and CUDA. But I was ( and still I am ) too cautious about the sheer volume and the steep learning curve of these technologies.

But now the picture is slightly . . . very slightly seem to be changing !

- CUDA and Parallel Processing are now a part of syllabus for Computer Engineering degree and post-graduation courses of many universities, government and autonomous institutions.
[ It has also come to my attention that these subjects are ‘compulsory’ for some Engineering branches ].

- Not only students, but teachers have also begun realising that “Not Knowing About The Technologies Mentioned Above” will not be an option.

- Students are responding well to my “Undoing Lord Macaulay” seminars. They seem to be awakening. They are ready to learn if they are taught well. They have now started understanding : What is meant by “Knowing the Path and Walking the Path”.

So now I have decided to give it a try and go for teaching these subjects at least up to a certain extent. After making up my mind to teach subjects like OpenGL/Direct3D/CUDA, as a startup, I am starting with their seminars, though this option is ‘inadequate and not giving due justice to these subjects’, it will introduce the subject to the students, thus enabling them understand, write code and appear comfortably and gracefully for their academic course exams and last semester projects.

- The first option was to go for two complete 6 month courses, one for OpenGL and the other for CUDA & HPP.
This is impossible, because we are already running two complete 6 month courses : UNIX & Win32SDK/COM/WinRT.

- The second option, though ‘inadequate and not giving due justice to these subjects’, was to go for two days INTRODUCTORY seminars which will introduce the subject to the students, thus enabling them understand, write code and appear comfortably and gracefully for their academic course exams and last semester projects.

========================================================================================

Enough prelude! Lets know more about this seminar :
- - - - - - - - - - - - - - - - - - - - - - - - - -

What is HPP? :
==============

Heterogeneous Parallel Programming is about making the Graphics Card Processor ( GPU ) help CPU to do the heavy jobs in comparatively very much less time, for which the CPU, working alone might have taken much more time.
In essence, it boosts system performance dramatically . . . . . exponentially.

What you can do after learning HPP :
====================================

Using CUDA/OpenCL/C++AMP like HPP technology, you can “Programmatically” enter any such field where there is a performance bottleneck and the need to boost overall system performance arises from time to time. Like :

a) In Scientific Computation like Physics/Chemistry/Mathematics/Astronomy etc.
b) In Financial Computation like the Share market.
c) In Scientific Visualisations i.e: Medical/Pharmaceutical/Astronomical/Molecular/Automobile etc.
d) In Creative Visualisations like the ones we see in TV/Movie/Web advertisements.
e) In Content Creation softwares like AutoCAD/3DS-Max/Maya/Cinema4D/Z-Brush/Blender.
f) In any/all 3D games.
g) In any/all Computer Graphics-related implementations.
h) In any/all Digital Image Processing-related implementations.
i) In Security like Encryption/Decryption.
j) In Audio/Video/Multimedia.
k) etc.
[ Wherever I used the word “etc” in above listing, I am forced to stop not by choice, but by my limitations. ]

HERE IS SOMETHING AMAZING AND SHOCKING :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, Mobiles also support HPP. Yes, I shall practically show you my own demo(s) on iOS, Android and and probably on the Windows Mobile HP Elite X3.

HERE IS SOMETHING MORE AMAZING AND SHOCKING :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, Web Browsers also support HPP. Yes, I shall practically show you my own demo(s) on Web browser.

Okay. Say, You Have Decided To Learn It. Then, What Are The Prerequisites?
===========================================================================

The answer is in a single line : Eternal passion, Eternal patience and Eternal persistence.
Though the answer above is philosophical, it is applicable to all sorts of learning.

Practically speaking, there are only(?) 4 prerequisites :

a) Computer Fundamentals
[ Don’t ever underestimate the power of the word “FUNDAMENTALS” ]

b) Operating System Concepts
[ A very fishy prerequisite, from one single line to a PhD dissertation, you come with what you know ]

c) You must love Coding. I mean lots of coding.

d) You must be comfortable with the C Programming Language and data structures.

* As far as engineering is concerned, these technologies need full mathematical background of different mathematical algorithms. They are not at all a part of this seminar. That is solely student’s responsibility.

Can I learn HPP on my own?
==========================

Of course!
How do you think I did?

How I did it ?
==============

In one graphics application, a heavy textured object was taking much time to load. I had heard about nVidia’s CUDA technology. So I gave it a try, by passing that texture to the CUDA GPU and then to the graphics pipeline and saw the magical speed boost with all 20 fingers ( hands and feet ) in my mouth. You will do that too when you will see demos, I guarantee it.

Is that so, then why this seminar? Can’t we do it on our own just like you did?
===============================================================================

Surely. Rather you should/must do it on your own.

But here comes the problem :
My long teaching experience has shown me that students have difficulty in reading books either due to lack of patience or due to language-related problems. Many students understand concepts well if they are taught rather than if they read.

This is where “HPP seminar” may come into the picture to rescue you from this ‘Bibliophobia’ and may save your startup time.
========================================================================================

What are the possible contents of this HPP seminar?
===================================================

So assuming that you have gone through above introduction, understood every line of it, we can go for the possible contents of the seminar :

01) What it is.
02) Brief evolution from Multithreading, Multicore, Multiprocessor programming.
03) HPP related terminologies.
04) Information about current HPP technologies.
05) GPU architecture.

* CUDA :
  ======

06) Creating, Compiling, Linking and Executing CUDA Application
     On Windows [ Both Visual Studio IDE And Command Line Methods ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

07) Creating, Compiling, Linking and Executing CUDA Application
     On Linux [ Command Line Method ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

08) Creating, Compiling, Linking and Executing CUDA Application :
     On Mac OS X [ Both Xcode IDE And Command Line Methods ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

09) Understanding related & important concepts of CUDA while doing above things.

* OpenCL :
  ========

10) Creating, Compiling, Linking and Executing OpenCL Application
     On Windows [ Both Visual Studio IDE And Command Line Methods ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

11) Creating, Compiling, Linking and Executing OpenCL Application
     On Linux [ Command Line Method ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

12) Creating, Compiling, Linking and Executing OpenCL Application :
     On Mac OS X [ Both Xcode IDE And Command Line Methods ]
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

13) Understanding related & needed concepts of OpenCL while doing above things.

14) Demonstration of using OpenCL In Browser for :
     a) Hello World Application
     b) Vector Addition Application.
     c) Matrix Multiplication Application.

* Compute Pipeline
  ================

15) Briefing about Compute pipeline with “Vector Addition” example.
     a) OpenGL Compute Shader.
     b) DirectCompute
     c) Vulkan Compute ( If possible )

* Real World
  ==========

16) Comparative Performance Measurement in terms of “spent time” on the “same GPU” on the “same OS” but with different Homogenous and Heterogeneous technologies like :
     a) OpenMP,
     b) MPI,
     c) CUDA,
     d) OpenCL,
     e) C++ AMP
        etc,

17) Comparative Performance Measurement in terms of “spent time” on “different GPUs” on “different OSs” like :
     a) C++ AMP on Desktop Windows,
     b) Direct Compute on Desktop Windows and probably on Windows Mobile HP Elite X3,
     c) CUDA on Linux and on Android based nVidia Shield tablet,
     d) OpenCL on Mac OS X and on Android based LeEco Max 2 mobile,
     e) Metal On iOS : iPhone 6+ mobile and iPad Pro tablet,
     f) Compute Shader on Android : LeEco Max 2 mobile and nVidia Shield tablet
     g) Compute Shader on Desktop OS like Windows/Linux/Mac.

18) Experiencing the use of Parallel Computing in real world :
     a) Physics simulation.
     b) Astronomical simulation.
     c) Medical Visualisation.
     d) Image Processing ( DSP )
     e) 3D-Creative visualisation.

* REMEMBER : 14, 15, 16, 17, 18 will only be demonstrated and explained with my own live applications.
========================================================================================

What this seminar is NOT about?
===============================

- It is not about theory. Some theory will be taught, but very less and on-requirement basis.
Majorly, this seminar is about coding.

- It is not about Multithreaded Programming : Because that alone deserves a completely and separately dedicated seminar.
[ If passion and time permits, we may tell and show you something about it ].

- It is not about Multicore Programming : Because that alone deserves a completely and separately dedicated seminar.
[ If passion and time permits, we may tell and show you something about it ].

- It is not about Multi-processor ( Homogenous ) Programming.

- REMEMBER : It is not about Mathematics and Algorithms of parallel programming patterns.
This is because of the diversity of patterns and each of them requires different mathematical implementation and they constitute a very time consuming theory. This deserves a separate and full-fledged course.


Who should attend this seminar?
===============================

Answer to this question is now obvious :
The one, who has understood each and every line from this document.

Who should not attend this seminar?
===================================

- Those who already know all of the above content ( ? )

- Those who decide to learn HPP on their own.

- Those who can learn from books/videos etc.

- Those who think fees should be less and contents should be more.

- Those who need this seminar for free.

- Those who have never coded yet and are not comfortable with C/Data Structures.
[ Hello World in TurboC/VisualC++/gcc/Xcode is not enough ]

- Those who are Syllabus/Examination/Job oriented.

- Those who are unable to sit/see/hear for long time.

- Those who are unable to put their mobiles and Facebook/WhatsApp “SWITCHED-OFF”.

- Those who are ALWAYS busy for weekends.

- Those who are tired/bored of learning new things.

- Those who are managing doers rather than being a doer.

What we should bring?
=====================

- Passion, patience and persistence.

- Laptops is not required. Don’t even consider bringing them.

- One notebook and a pen are more than enough.

- We will upload the code of applications on our web site.
Download and bring their printouts for your reference during seminar.
Morally ,you should have your own printouts rather than being the ‘Peeping Tom’.

Notes/CDs/DVDs :
================

No Notes/CDs/DVDs will be given.
You are expected to see live, hear live and write live.

Special Precaution :
~~~~~~~~~~~~~~~~~~~~

Workshop may end around 9-00 PM. It might even touch 10-00 PM on Sunday. ’WOMEN SAFETY’ is at utmost priority. So please reconsider in case of time and pickup constraints.

To Parents/Guardians :
~~~~~~~~~~~~~~~~~~~~~~

I am apologising in advance for any delay after 9-00 PM on seminar days.
The reason is that, I do not stop until I feel satisfied by “giving” for which I am paid for.
Just be happy for the fact that this time your ward is making delay for studies and not for parties. So please forgive your ward and me too.