Resource: HIP Sample Applications

The HIP sample apps contain applications that introduce various GPU programming concepts that are usable in HIP.

The samples cover topics such as using and accessing different parts of GPU memory, running multiple GPU streams, and optimization techniques for GPU code.

Certain apps aren’t included due to complexities with either ROCm or Docker (hipEvent, profiler), or due to lack of feature support in gem5 (peer2peer)

Compiling the HIP samples, compiling the GCN3_X86 gem5, and running the HIP samples on gem5 is dependent on the gcn-gpu docker image, built from the util/dockerfiles/gcn-gpu/Dockerfile on the gem5 stable branch.


cd src/gpu/hip-samples
docker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID make

Individual programs can be made by specifying the name of the program

By default, the apps are built for all supported GPU types (gfx801, gfx803). This can be changed by editing the –amdgpu-target argument in the Makefile.

Pre-built binary