title: HIP breadcrumbs:
HIP (TODO abbreviation) is AMD ROCm's runtime API and kernel language, which is compilable for both AMD (through ROCm) and NVIDIA (through CUDA) GPUs. Compared to OpenCL (which is also supported by both NVIDIA and AMD), it's much more similar to CUDA (making it very easy to port CUDA code) and allows using existing profiling tools and similar for CUDA and ROCm.
{:.no_toc}
sudo apt install libnuma-dev wget gnupg2
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
sudo apt install hip-nvcc
sudo apt install mesa-common-dev clang comgr
/usr/local/cuda
): Should already point to the right thing./opt/rocm
): sudo ln -s /opt/rocm-4.2.0 /opt/rocm
(example)echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/rocprofiler/bin:/opt/rocm/opencl/bin' | sudo tee -a /etc/profile.d/rocm.sh
/opt/rocm/bin/hipconfig --full
hipconfig --config
amd
or nvidia
): hipconfig --platform
hipify-perl input.cu > output.cpp
{% include footer.md %}