{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## N Ways to GPU Programming - MD\n", "\n", "## Learning objectives\n", "With the release of CUDA in 2007, different approaches to programming GPUs have evolved. Each approach has its own advantages and disadvantages. By the end of this bootcamp session, students will have a broader perspective on GPU programming approaches to help them select a programming model that better fits their applications' needs and constraints. The bootcamp will teach how to accelerate a popular algorithm of Radial Distribution Function (RDF) using the following methods:\n", "* Standard: C++ stdpar, Fortran Do-Concurrent\n", "* Directives: OpenACC, OpenMP\n", "* Frameworks: Kokkos\n", "* Programming Language Extension: CUDA C, CUDA Fortran\n", "\n", "Let's start with testing the CUDA Driver and GPU you are running the code on in this lab:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!nvidia-smi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "### Tutorial Outline\n", "\n", " We will be following the cycle of Analysis - Parallelization - Optimization cycle throughout. To start with let us understand the Nsight tool ecosystem: \n", "\n", "- [Introduction to Profiling](../../profiler/English/jupyter_notebook/profiling.ipynb)\n", " - Overview of Nsight profiler tools\n", " - Introduction to Nsight Systems\n", " - How to use NVTX APIs\n", " - Introduction to Nsight Compute\n", " - Optimization Steps to parallel programming \n", " \n", "We will be working on porting a radial distribution function (RDF) to GPUs. Please choose one of the programming language to proceed working on RDF. \n", "\n", "\n", "#### C Programming Language\n", " \n", "Please read the [RDF Overview](C/jupyter_notebook/serial/rdf_overview.ipynb) to get familiar with how this application works.\n", "\n", "Below is the list of GPU programming approaches we will be covering during this course, click on the link below to start exploring:\n", " \n", "1. [stdpar](C/jupyter_notebook/stdpar/nways_stdpar.ipynb)\n", "2. [OpenACC](C/jupyter_notebook/openacc/nways_openacc.ipynb)\n", "\n", "3. [OpenMP](C/jupyter_notebook/openmp/nways_openmp.ipynb) \n", "4. [CUDA C](C/jupyter_notebook/cudac/nways_cuda.ipynb) \n", "\n", "To finish the lab let us go through some final [remarks](C/jupyter_notebook/Final_Remarks.ipynb)\n", "\n", "#### Fortran Programming Language\n", "\n", "Please read the [RDF Overview](Fortran/jupyter_notebook/serial/rdf_overview.ipynb) to get familiar with how this application works.\n", "\n", "Below is the list of GPU programming approaches we will be covering during this course, click on the link below to start exploring:\n", "\n", "1. [do-concurrent](Fortran/jupyter_notebook/doconcurrent/nways_doconcurrent.ipynb)\n", "2. [OpenACC](Fortran/jupyter_notebook/openacc/nways_openacc.ipynb)\n", "\n", "3. [OpenMP](Fortran/jupyter_notebook/openmp/nways_openmp.ipynb) \n", "4. [CUDA Fortran](Fortran/jupyter_notebook/cudafortran/nways_cuda.ipynb) \n", "\n", "To finish the lab let us go through some final [remarks](Fortran/jupyter_notebook/Final_Remarks.ipynb)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "### Tutorial Duration\n", "The lab material will be presented in a 8hr session. Link to material is available for download at the end of the lab.\n", "\n", "### Content Level\n", "Beginner, Intermediate\n", "\n", "### Target Audience and Prerequisites\n", "The target audience for this lab is researchers/graduate students and developers who are interested in learning about programming various ways to programming GPUs to accelerate their scientific applications.\n", "\n", "Basic experience with Fortran programming is needed. No GPU programming knowledge is required.\n", "\n", "-----\n", "\n", "#