Here are some instructions on how to compile and run some tests that exploit C++ standard parallelism.
NOTE: these exercises have been tested on MI210 and MI300A accelerators using a container environment.
To see details on the container environment (such as operating system and modules available) please see README.md
on this repo.
git clone https://github.com/amd/HPCTrainingExamples.git
export HSA_XNACK=1
module load amdclang
cd ~/HPCTrainingExamples/HIPStdPar/CXX/saxpy_foreach
make
export AMD_LOG_LEVEL=3
./saxpy
clean
export HSA_XNACK=1
module load amdclang
cd ~/HPCTrainingExamples/HIPStdPar/CXX/saxpy_transform
make
export AMD_LOG_LEVEL=3
./saxpy
clean
export HSA_XNACK=1
module load amdclang
cd ~/HPCTrainingExamples/HIPStdPar/CXX/saxpy_transform_reduce
make
export AMD_LOG_LEVEL=3
./saxpy
clean
#!/bin/bash
git clone https://github.com/pkestene/tsp
cd tsp
git checkout 51587
wget -q https://raw.githubusercontent.com/ROCm/roc-stdpar/main/data/patches/tsp/TSP.patch
patch -p1 < TSP.patch
cd stdpar
export HSA_XNACK=1
module load amdclang
export STDPAR_CXX=$CXX
export ROCM_GPU=`rocminfo |grep -m 1 -E gfx[^0]{1} | sed -e 's/ *Name: *//'`
export STDPAR_TARGET=${ROCM_GPU}
export AMD_LOG_LEVEL=3 #optional
make tsp_clang_stdpar_gpu
./tsp_clang_stdpar_gpu 13 #or more...
make clean
cd ../..
rm -rf tsp
cd ~/HPCTrainingExamples/HIPStdPar/CXX/ShallowWater_Orig
mkdir build && cd build
cmake ..
make
./ShallowWater
cd ..
rm -rf build
cd ~/HPCTrainingExamples/HIPStdPar/CXX/ShallowWater_Ver1
mkdir build && cd build
cmake ..
make
./ShallowWater
cd ..
rm -rf build
export HSA_XNACK=1
module load amdclang
cd ~/HPCTrainingExamples/HIPStdPar/CXX/ShallowWater_Ver2
make
#export AMD_LOG_LEVEL=3
./ShallowWater
make clean
export HSA_XNACK=1
module load amdclang
cd ~/HPCTrainingExamples/HIPStdPar/CXX/ShallowWater_StdPar
make
#export AMD_LOG_LEVEL=3
./ShallowWater
make clean