TransferBench environment variables#
TransferBench behavior can be customized using environment variables. This topic describes the environment variables that control the TransferBench client (frontend), backend library, and runtime.
Note
Environment variables read by the frontend client apply to both configuration-file runs and preset runs. Variables prefixed with TB_ are read by the backend library and are not part of the frontend client.
Frontend client environment variables#
The following environment variables are read by the TransferBench client and apply to configuration-file runs and presets.
General options#
Environment variable |
Description |
Default value |
|---|---|---|
|
Number of timed iterations per test. If negative, runs for that many seconds instead. For example, |
|
|
Sub-iterations per iteration. Set to Within each iteration, the transfer is repeated |
|
|
Untimed warmup iterations per test. |
|
|
Shows ASCII box-drawing characters in tables. Set to |
|
|
Shows per-iteration timing. Set to |
|
|
Specifies whether to pause for user input before the transfer loop. Set to The first pause occurs after memory allocations are prepared and before any transfers are executed. The second pause occurs after transfers are executed and before transfers are validated. This is useful for profiling: start profiling after the first pause, then capture data before validation begins. |
|
|
Hides the environment variable listing. Set to |
|
|
Generates results in CSV format. Set to |
|
|
Controls how many transfer sizes are sampled per power-of-2 range when |
|
Data and validation options#
Environment variable |
Description |
Default value |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Specifies whether to validate after each iteration. Set to By default, validation is only done after all iterations, which can mask errors that occurred in all but the last iteration. |
|
||||||||||||||||||
|
Granularity in bytes for dividing work across sub-executors. |
|
||||||||||||||||||
|
Initial byte offset for allocations. Must be a multiple of 4. |
|
||||||||||||||||||
|
Comma-separated percentages for 64-byte line fill across five bins: random, 1B0, 2B0, 4B0, and 32B0. These patterns produce data with varying compressibility, used to test XGMI compression behavior. The integer values must sum to 100 and correspond to the following bins:
|
— |
||||||||||||||||||
|
Big-endian hex pattern for source data. Must have an even number of digits. Allows users to specify a particular data pattern. |
— |
||||||||||||||||||
|
Specifies whether to validate the GPU destination directly. Set to On AMD hardware, the CPU can directly access GPU device memory, avoiding the need for a staging buffer. This feature is not supported on NVIDIA hardware. |
|
||||||||||||||||||
|
Specifies whether to validate the source immediately after preparation. Set to Validates that source memory matches the expected pattern immediately after initialization. Useful when debugging DMA anomalies that affect the initial copy to the GPU. |
|
GFX and kernel options#
Environment variable |
Description |
Default value |
|---|---|---|
|
Block ordering when running in multitransfer single-stream mode. This controls how threadblocks are assigned to transfers. For example, with 4 transfers (A, B, C, D) each using 3 CUs: Threadblock : 00 01 02 03 04 05 06 07 08 09 10 11
====================================================
0 = Sequential : A0 A1 A2 B0 B1 B2 C0 C1 C2 D0 D1 D2
1 = Interleaved: A0 B0 C0 D0 A1 B1 C1 D1 A2 B2 C2 D2
2 = Random : C1 D2 B1 B0 A0 C0 D1 D0 A1 C2 A2 B2
Use this setting to investigate how threadblock assignment to XCCs impacts performance. |
|
|
Number of threads per threadblock. Must be a multiple of 64. |
|
|
Subexecutor granularity. By default, each SubExecutor consists of one threadblock. Setting this to |
|
|
Controls how stores and loads are performed using non-temporal operations. |
|
|
Unroll factor for the GFX kernel. Set to |
(architecture-dependent) |
|
SubExecutor memory access mode. |
|
|
Stride ordering for GFX waves. |
|
|
Packed data size in DWORDs. |
|
|
Timing method for GFX and DMA transfers. |
|
|
Stream assignment. |
|
|
CU mask for streams, specified as a comma-separated list of indices or ranges (for example, |
— |
|
Preferred XCC per source-by-destination GPU pair, specified as a comma-separated list. Supported on AMD hardware only. |
— |
DMA options#
Environment variable |
Description |
Default value |
|---|---|---|
|
DMA implementation. |
|
Variable SubExecutor options#
Environment variable |
Description |
Default value |
|---|---|---|
|
Minimum number of SubExecutors for variable SubExecutor transfers. |
|
|
Maximum number of SubExecutors. Set to |
|
NIC options#
The following environment variables apply only when NIC support is enabled. To enable NIC support, use DISABLE_NIC_EXEC=0 (Makefile) or -DENABLE_NIC_EXEC=ON (CMake). For details, see Building TransferBench from source.
Environment variable |
Description |
Default value |
|---|---|---|
|
RoCE GID index. Set to |
|
|
RDMA port number. |
|
|
IP address family. |
|
|
Bytes per NIC RDMA chunk. |
|
|
RDMA ordering. |
|
|
RoCE version. |
|
HIP runtime variables (client-read)#
The following variable is a HIP runtime environment variable, not a TransferBench variable. Set it in your shell before running TransferBench.
Environment variable |
Description |
Default value |
|---|---|---|
|
A HIP runtime environment variable that sets the maximum number of hardware queues per GPU per process. When more than four GPU-executed transfers run simultaneously with |
|
Backend environment variables#
The following environment variables are read by the TransferBench backend library or build system. They are not part of the frontend client and are prefixed with TB_.
Backend variables#
Environment variable |
Description |
|---|---|
|
Backend verbosity level. For example, set to |
|
Path of the configuration file used to dump executed transfers. This dumps all executed transfers to a configuration file that can then be re-executed by TransferBench. This can be used to capture the transfers executed by a preset, facilitating any further modifications and customizations. |
|
Pause before execution. Useful for attaching a debugger. For example: > TB_PAUSE=1 ./TransferBench
# Pausing for debug attachment (PID: 2443974)
> sudo gdb -p 2443974
5741 while (pause);
set pause=false
continue
|
|
Regex pattern to limit visible NICs. Useful in preset scenarios that require homogeneous configurations. For example: # Without filter:
> mlx5_0, mlx5_1, mlx5_2, mlx5_3, mlx5_4, mlx5_5, mlx5_6, mlx5_7
# With filter (> shows the resulting visible NICs):
TB_NIC_FILTER="mlx5_1|mlx5_3" > mlx5_1, mlx5_3
TB_NIC_FILTER="mlx5_[1,4,5]" > mlx5_1, mlx5_4, mlx5_5
TB_NIC_FILTER="mlx5_[1-3,7]" > mlx5_1, mlx5_2, mlx5_3, mlx5_7
TB_NIC_FILTER="mlx5_.*" > mlx5_0, mlx5_1, mlx5_2, mlx5_3, mlx5_4, mlx5_5, mlx5_6, mlx5_7
|
|
Number of 64-byte lines to dump when debugging For example: TB_DUMP_LINES=10
Input pattern 64B line statistics for bufferIdx 0:
Total lines: 16384
- 0: Random : 3276 ( 19.995%)
- 1: 1B0 : 3277 ( 20.001%)
- 2: 2B0 : 3277 ( 20.001%)
- 3: 4B0 : 3277 ( 20.001%)
- 4: 32B0 : 3277 ( 20.001%)
|
|
Forces single pod mode, skipping AMD-SMI and NVML pod queries. This assumes that all GPUs are in the same pod and skips cluster membership API calls. |
HSA runtime variables#
Environment variable |
Description |
|---|---|
|
Enables SDMA when set to This is a HIP runtime environment variable. When SDMA is disabled, the DMA Executor falls back to using blit kernels (GFX) internally. |