Files
gem5/util/dockerfiles/gpu-fs
Matthew Poremba 9b463dbdfd util-docker: Bump gpu-fs build docker to ROCm 6.0.2 (#1025)
This bumps the docker image used to build GPU applications for input to
GPUFS simulations from ROCm 5.4.2 to ROCm 6.0.2 and Ubuntu from 20.04 to
22.04. This matches the versions in gem5-resources#29 .

Several notes were added to the Dockerfile to describe where the RUN
commands come from. A README.md is also added to clarify that this is
not a disk image for GPUFS and is only used to build applications.

Change-Id: I9ada99e2ed1854cb7adb76f2a1fa662bab398f86
2024-04-15 13:36:06 -07:00
..

rocm-build Dockerfile

The Dockerfile in this directory is used to build applications to be run with GPU full system. Applications targeting AMD's ROCm GPU framework can be built using this docker (e.g., HIP, HSA, OpenCL, etc.). The current major ROCm version targeted is 6.0.2. This version matches the disk image provided in gem5-resources.

The purpose of this docker image is to allow building applications without requiring ROCm to be installed on the host machine. If you have ROCm installed locally and the version matches the disk image of the simulated system, this docker is not required and you may build on the host normally. This docker is also not the disk image used to simulated GPU full system applications (i.e., not an input to gem5 itself).

Building the docker image

docker build -t <image_name> .

For example:

docker build -t rocm6-build .

Building an application

Building an application requires that docker run in a directory which has access to all files needed to build. The simplest example would be square in the gem5-resources repository. Square provides a Makefile and has only one input file:

cd gem5-resources/src/gpu/square
docker run --rm -u $UID:$GID -v $PWD:$PWD -w $PWD rocm6-build make

More complex applications, such as applications requiring m5ops, applications with multiple build steps, or paths with symlinks require more complex --volume command line options. See the docker documentation to figure out how to set the volumes to build your application.