Coder Social home page Coder Social logo

ashishd / hip_course Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pelagos-consulting/hip_course

0.0 0.0 0.0 225.47 MB

Accelerated computing with HIP

License: Other

Shell 0.01% JavaScript 0.08% C++ 1.37% Python 0.03% C 0.12% CSS 0.05% Makefile 0.02% HTML 68.95% Jupyter Notebook 29.37%

hip_course's Introduction

Accelerated computing with HIP

The Heterogeneous Interface for Portability (HIP) provides a programming framework for harnessing the compute capabilities of multicore processors such as the AMD MI250X GPU’s on Setonix. In this course we focus on the essentials of developing HIP applications, with a focus on supercomputing.

Folder structure

  • course_material - contains the course material.
  • deployment - contains tools for deploying course material to Github and managing users.
  • resources - helpful tools and information for use within the course.

Syllabus

In this course we cover the following topics. Each topic is a subfolder in course_material.

  • Lesson 1 - Introduction to HIP and high level features
  • Lesson 2 - How to build and run applications on Cray AMD systems like Frontier and Setonix
  • Lesson 3 - A complete example of matrix multiplication, explained line by line
  • Lesson 4 - Debugging HIP applications
  • Lesson 5 - Measuring the performance of HIP applications with profiling and tracing tools
  • Lesson 6 - Memory management with HIP
  • Lesson 7 - Strategies for improving the performance of HIP kernels
  • Lesson 8 - Strategies for optimising application performance with concurrent IO.
  • Lesson 9 - Porting CUDA applications to HIP

Format

Lessons are in the form of Jupyter notebooks which can be viewed on the student's machine with JupyterLab or with a web browser. All exercises may be performed on the command line using an SSH connection to a remote server that has ROCM installed.

Installation

Anaconda Python (optional)

A recent version of Anaconda Python is helpful for viewing the notebook files. Once Anaconda is installed create a new environment

conda create --name hip_course python=3.10 nodejs=18.15.0
conda activate hip_course

A list of helpful packages for viewing the material may then be installed with this command when run from the HIP_Course folder.

pip install -r deployment/requirements.txt

then run

jupyter-lab

from the command line to start the Jupyter Lab environment. The command

conda activate hip_course

is to enter the created environment, and the command

conda deactivate

will leave the environment.

ROCM

In order to use the material in this course a full installation of ROCM is advised. It is the path of least pain to use a distribution of Linux that ROCM officially supports. The AMD utility amdgpu-install can install ROCM packages. This command will install the ROCM tools.

sudo amdgpu-install -y --usecase=opencl,hip,rocm,openclsdk,hip,hiplibsdk,rocmdevtools,rocmdev

AMD backend

It is advisable to use an AMD graphics card that ROCM supports. Other AMD GPU's work unofficially, but you can expect the occasional undefined behaviour and things not working like they should.

NVIDIA backend

HIP can also use a CUDA backend. In that case install both ROCM and a compatible version of CUDA. Usually a safe choice for CUDA is the previous major release. Then the course may be run on a CUDA backend with a recent NVIDIA graphics card. In such instances the environment variable HIP_PLATFORM must be set to nvidia.

export HIP_PLATFORM=nvidia

CPU backend

If either the AMD or NVIDIA backend is not available, then the HIP CPU runtime is a header-only library that provides a way to develop HIP applications on a CPU.

hip_course's People

Contributors

drtpotter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.