The course will consists of the following sections:
| Name | Instructor |
|---|---|
| 0. Introduction | Marcin Lewandowski |
| 1. GPU Programming Refresher | Marcin Lewandowski, Piotr Jarosik |
| 2. GPU Performance Guidelines and Patterns | Piotr Jarosik |
| 3. CUDA in practive: ray-tracing | Piotr Karwat |
| 4. Software Defined Ultrasound Architecture with GPU Processing | Piotr Jarosik |
- CMake 3.18 or newer (3.21 or newer for the HIP backend).
- A C++17 host compiler.
- One of the following GPU toolchains:
| backend | toolchain |
| --- | --- | --- |
| CUDA | NVIDIA CUDA Toolkit (nvcc) |
| HIP | AMD ROCm (hipcc, or the ROCm Clang) |
Optional:
- A profiler (
nsysandncu, orrocprofv3) if metrics are to be collected.
Run the complete suite with the arguments quoted in the slides:
./scripts/run_benchmarks.shThe results are written to a directory named after the GPU: run.log,
host.txt, csv/<example>.csv and prof/*.txt. Useful options:
./scripts/run_benchmarks.sh --no-profile # benchmarks only
./scripts/run_benchmarks.sh --no-build # reuse an existing build
./scripts/run_benchmarks.sh --backend=hip
./scripts/run_benchmarks.sh --tag=h100 --out=/tmp/h100A single benchmark may also be run directly:
./build/fir_filter_cuda --n=33554432 --taps=64 --csv=fir.csvTo verify correctness only:
ctest --test-dir buildOn AMD hardware, define GPUSC_NO_TEXTURE when building example 05: CDNA
GPUs provide no texture hardware, and the texture variants do not compile
there.
Build the images from the examples/ directory. Each image builds every
example and runs the full suite on start.
# NVIDIA (requires the NVIDIA Container Toolkit)
docker build -f docker/Dockerfile.cuda -t gpusc-cuda .
docker run --rm --gpus all gpusc-cuda
# AMD
docker build -f docker/Dockerfile.hip -t gpusc-hip .
docker run --rm --device=/dev/kfd --device=/dev/dri --group-add video \
--security-opt seccomp=unconfined gpusc-hip
To run a single benchmark, pass it as the command:
```bash
docker run --rm --gpus all gpusc-cuda ./build/fir_filter_cuda --n=33554432 --taps=64Target architectures are build arguments, for example
--build-arg CUDA_ARCHITECTURES="90" or
--build-arg HIP_ARCHITECTURES="gfx950". To collect the CSV files, mount a
directory and set GPUSC_CSV_DIR:
docker run --rm --gpus all -v "$PWD/results:/results" -e GPUSC_CSV_DIR=/results gpusc-cuda