* The GCC used in the GCN-GPU images was increase from version 8 to version 10. This was necessary due to PR #1145 which made GCC require GCC >=10. This patch was previously part of #1161 but has been merged into this PR. * A patch has been applied to ROCm-OpenCL-Runtime to fix a linking error in which there were multiple definitions of `ret_val`. This issue is highlighted here: https://github.com/ROCm/ROCm-OpenCL-Runtime/issues/113. This was previously part #1161 but has been moved into this PR. * The Dockerfile's `RUN` command (built to layers in the Docker image) have been refactored so sources and built objects are deleted in the same RUN command as where they were built and installed. This reduces the size of the image substantially: from 16.3GB down to 6.6GB. * The `apt upgrade` has been removed. This step (previously at the start of the file) did nothing of importance. Removing it saves both time building the image and reduces the size of the image by a small amount. * `--depth=1` is used when cloning repositories so the entire commit tree tree is not pulled each time. This saves some time when building the image. * `apt -y update` has been added where `apt -y install` is used so CACHED image layers do not become an issue in the future if the image were to be rebuilt.
gcn-gpu dockerfile
This dockerfile contains all the dependences necessary to run GPU applications in gem5 using the gcn5 (Vega) APU model
Building the image
docker build -t <image_name> .
Building gem5 using the image
The following command assumes the gem5 directory is a subdirectory of your current directory
docker run --rm -v $PWD/gem5:/gem5 -w /gem5 <image_name> scons -sQ -j$(nproc) build/VEGA_X86/gem5.opt
Test gem5 using a prebuilt application
wget http://dist.gem5.org/dist/current/test-progs/hip_sample_bins/MatrixTranspose
docker run --rm -v $PWD/MatrixTranspose:/MatrixTranspose -v $PWD/public_gem5:/gem5 -w /gem5 \
<image_name> build/VEGA_X86/gem5.opt configs/example/apu_se.py -n2 --benchmark-root=/ -cMatrixTranspose
Notes
- When using the
-vflag, the path to the input file/directory needs to be the absolute path; symlinks don't work - Currently linking in an AFS volume is not supported, as it uses ACLs instead of owner/group IDs
ToDo
- Add square to gem5-resources github, add directions for building and running an application