CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
71 lines
2.4 KiB
Markdown
71 lines
2.4 KiB
Markdown
# TransferBench
|
|
|
|
## Overview
|
|
|
|
TransferBench is a comprehensive all-to-all transfer benchmark that measures data movement performance across CPU, GPU compute (GFX), GPU SDMA, and NIC RDMA executors. It supports configurable transfer patterns, block sizes, and hardware queue limits, making it useful for profiling interconnect bandwidth, PCIe throughput, and multi-device communication topologies. The benchmark validates transfer correctness and reports per-executor-type bandwidth.
|
|
|
|
## Source Files
|
|
|
|
- `AllToAll.cpp` - Main benchmark driver with environment variable configuration, transfer pattern setup, and performance measurement loop.
|
|
- `TransferBench.hpp` - Data structures, executor type definitions (`EXE_CPU`, `EXE_GPU_GFX`, `EXE_GPU_DMA`, `EXE_NIC`), and configuration parameters.
|
|
|
|
## Prerequisites
|
|
|
|
- CMake 3.25+
|
|
- HIP runtime and `hipcc` compiler
|
|
- HSA runtime library (headers and library)
|
|
- AMD Instinct GPU (APU-only targets are skipped)
|
|
|
|
## Building
|
|
|
|
**Standalone build:**
|
|
|
|
```bash
|
|
cmake -B <build_dir> -S <project_root>/examples/transferBench -DCMAKE_PREFIX_PATH=/opt/rocm
|
|
cmake --build <build_dir>
|
|
```
|
|
|
|
**As part of the examples suite:**
|
|
|
|
```bash
|
|
cmake -B <build_dir> -S <project_root>/examples/ -DCMAKE_PREFIX_PATH=/opt/rocm
|
|
cmake --build <build_dir> --target transferBench
|
|
```
|
|
|
|
## Running
|
|
|
|
```bash
|
|
./transferBench
|
|
```
|
|
|
|
TransferBench is primarily configured through environment variables. Key settings:
|
|
|
|
| Variable | Description | Default |
|
|
| ---------- | ------------- | --------- |
|
|
| `NUM_ITERATIONS` | Number of benchmark iterations | varies |
|
|
| `BLOCK_BYTES` | Transfer block size in bytes | 256 |
|
|
| `GFX_BLOCK_SIZE` | GPU compute block size | 256 |
|
|
| `USE_HIP_EVENTS` | Use HIP events for timing | varies |
|
|
| `GPU_MAX_HW_QUEUES` | Maximum GPU hardware queues | 4 |
|
|
|
|
## Profiling with rocprofiler-systems
|
|
|
|
```bash
|
|
rocprof-sys-run -- ./transferBench
|
|
```
|
|
|
|
### Recommended Configuration
|
|
|
|
| Variable | Value | Purpose |
|
|
| ---------- | ------- | --------- |
|
|
| `ROCPROFSYS_ROCM_DOMAINS` | `hip_runtime_api,kernel_dispatch,memory_copy,memory_allocation` | Trace all GPU memory operations |
|
|
| `ROCPROFSYS_ROCM_EVENTS` | `SQ_WAVES,GRBM_COUNT` | Sample GPU hardware counters |
|
|
| `ROCPROFSYS_TRACE` | `true` | Generate Perfetto trace |
|
|
|
|
```bash
|
|
rocprof-sys-run \
|
|
-e ROCPROFSYS_ROCM_DOMAINS=hip_runtime_api,kernel_dispatch,memory_copy \
|
|
-e ROCPROFSYS_TRACE=true \
|
|
-- ./transferBench
|
|
```
|