1
0
HON95 2 жил өмнө
parent
commit
5366da6f04
3 өөрчлөгдсөн 42 нэмэгдсэн , 14 устгасан
  1. 10 8
      hpc/hip.md
  2. 2 6
      hpc/rocm.md
  3. 30 0
      se/ccpp-tools.md

+ 10 - 8
hpc/hip.md

@@ -27,18 +27,20 @@ Compared to OpenCL (which is also supported by both NVIDIA and AMD), it's much m
 
 ### Install for AMD GPUs
 
-1. Install ROCm: See [ROCm](../rocm/).
+1. Install the ROCm suite (contains HIP and other useful stuff): See [ROCm](../rocm/).
 
 ### Install for NVIDIA GPUs
 
-1. Install the CUDA toolkit and the NVIDIA driver: See [CUDA](/config/hpc/cuda/).
-1. Add the ROCm package repo (same as ROCm installation):
+Updated for ROCm 5.0.
+
+1. Install the CUDA toolkit and the NVIDIA driver: See [CUDA](../cuda/).
+1. Add the ROCm package repo:
     1. Install requirements: `sudo apt install curl libnuma-dev wget gnupg2`
-    1. Add repo key: `curl -sSf https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor > /usr/share/keyrings/rocm.gpg`
-    1. Add repo: `echo 'deb [signed-by=/usr/share/keyrings/rocm.gpg arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list`
-    1. Update cache: `apt update`
-1. Install: `sudo apt install hip-nvcc`
-1. Add to PATH: See [ROCm](../rocm/).
+    1. Add repo key: `curl -sSf https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor --output /usr/share/keyrings/rocm.gpg`
+    1. Add ROCm repo: `echo 'deb [signed-by=/usr/share/keyrings/rocm.gpg arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list`
+    1. Update cache: `sudo apt update`
+1. Install: `sudo apt install hip-dev hip-doc hip-runtime-nvidia`
+1. Add ROCm to PATH: `echo 'export PATH=$PATH:/opt/rocm/bin' | sudo tee /etc/profile.d/rocm.sh` (relog to reload)
 
 ### Post-Install Verification
 

+ 2 - 6
hpc/rocm.md

@@ -19,14 +19,10 @@ It uses the runtime API and kernel language HIP, which is compilable for both AM
 - [ROCm Installation (AMD ROCm Docs)](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html)
 - [ROCm_Installation_Guidev5.0: How To Install ROCm](https://docs.amd.com/bundle/ROCm_Installation_Guidev5.0/page/How_To_Install_ROCm.html)
 
-## Setup
+## Setup (Debian/Ubuntu)
 
 Updated for ROCm 5.0.
 
-### Installation (Debian/Ubuntu)
-
-#### Steps
-
 1. If the `amdgpu-pro` driver is installed then uninstall it to avoid conflicts. **TODO**
 1. If using Mellanox ConnectX NICs then Mellanox OFED must be installed before ROCm.
 1. Add the ROCm package repo:
@@ -44,7 +40,7 @@ Updated for ROCm 5.0.
     - For OpenMP: `rocm-openmp-sdk`
     - For ML: `rocm-ml-sdk rocm-ml-libraries`
     - Note: ROCm depends on `python`, which in Ubuntu installs `python-is-python2`.
-1. Add ROCm to PATH: `echo "export PATH=$PATH:/opt/rocm/bin:/opt/rocm/opencl/bin" | sudo tee -a /etc/profile.d/rocm.sh`
+1. Add ROCm to PATH: `echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/opencl/bin' | sudo tee /etc/profile.d/rocm.sh` (relog to reload)
 1. Add yourself to the relevant groups to use ROCm: `sudo usermod -aG video,render <username>`
 1. Reboot.
 1. Verify AMDGPU DKMS install: `sudo dkms status`

+ 30 - 0
se/ccpp-tools.md

@@ -0,0 +1,30 @@
+---
+title: C/C++ Tools
+breadcrumbs:
+- title: Software Engineering
+---
+{% include header.md %}
+
+## GDB
+
+**TODO**
+
+## Valgrind
+
+### Setup
+
+Arch: `sudo pacman -S valgrind` (and maybe `source /etc/profile.d/debuginfod.sh`)
+
+### Usage
+
+**TODO** `valgrind --leak-check=full <app>`
+
+## Cachegrind
+
+**TODO**
+
+## Callgrind
+
+**TODO**
+
+{% include footer.md %}