caesr-uwaterloo / pws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gem5 for PWS GPU

This is a fork of the official gem5 repo that implements the GPU architecture for PWS.

Docker Setup Guide

The instructions for setting up the docker container for running the GPU model are found here. This document assumes you already have docker installed on your machine. If using Windows, WSL2 and Docker tend to consume all available resources, so it may be worthwhile to limit the resources available to WSL2.

First Time Running Container

If it is the first time running the container, you need to first pull the image and create the container:

  1. docker pull gcr.io/gem5-test/gcn-gpu:v21-2
  2. docker run -it gcr.io/gem5-test/gcn-gpu:v21-2

The docker run command will attach the user to the container instance. To exit the container, enter the command exit.

Subsequent Accesses

If you have already created the container instance, there is no need to create another with docker run; instead, you can use docker start:

  1. Find the container name using docker container ls -a. You can use either the value in the CONTAINER ID or the NAMES field.
  2. docker container start -ia <container_name>.

To exit the container, enter the command exit.

gem5 Guide

Building

The guide to building gem5 is found here. The basic command to build the AMD APU system is:

scons -j8 build/GCN3_X86/gem5.opt --ignore-style

Where we assume the host machine can support 8 parallel threads of build execution. Use command nproc to see the number of available processors and for a good estimate of the number of threads to supply to the -j flag.

Running the Simulator

The gem5 GPU model documentation gives the square benchmark as a good starting point. From there, we can deduce that the general command to run the simulator is:

build/GCN3_X86/gem5.opt configs/example/apu_se.py -n 3 -c <benchmark_path> [-o "<options>"]

Running Benchmarks

To run example applications on the simulator, we recommend the HIP examples found here.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 77.6%Language:Python 13.6%Language:C 7.2%Language:Assembly 0.3%Language:HTML 0.2%Language:CMake 0.2%Language:Hack 0.2%Language:Shell 0.2%Language:M4 0.1%Language:Makefile 0.1%Language:Dockerfile 0.0%Language:Perl 0.0%Language:Starlark 0.0%Language:Fortran 0.0%Language:SuperCollider 0.0%Language:Roff 0.0%Language:Java 0.0%Language:Scala 0.0%Language:Vim Script 0.0%Language:sed 0.0%Language:Awk 0.0%Language:BASIC 0.0%Language:Emacs Lisp 0.0%Language:Forth 0.0%Language:SWIG 0.0%