Skip to content

[feat]: Add hipFile executor for storage based benchmarking. - #370

Draft
sbates130272 wants to merge 2 commits into
candidate-1.72.00from
users/stebates/add-hipfile
Draft

sbates130272 wants to merge 2 commits into
candidate-1.72.00from
users/stebates/add-hipfile

Conversation

@sbates130272

Copy link
Copy Markdown

Motivation

TransferBench can benchmark memory-to-memory bandwidth between GPUs and
CPUs, but had no way to measure GPU-to-storage I/O. This PR adds that
capability using hipFile, allowing NVMe storage to be treated as a first-
class endpoint alongside GPU and CPU memory in transfer definitions.

Technical Details

Memory type S (MEM_STORAGE)
SN names the N-th entry of TB_STORAGE_PATHS (a comma-separated list
of regular files or raw block devices such as /dev/nvme1n1).

Executor F (EXE_GPU_HIPFILE)
Uses hipFileRead / hipFileWrite to move data directly between NVMe
storage and GPU device memory (hipFile fastpath), falling back to POSIX
I/O through a host bounce buffer (compatibility path) when direct DMA is
unavailable. O_DIRECT is required; transfers fail if the filesystem does
not support it.

hipFile is an optional CMake build dependency. Enable with
-DENABLE_HIPFILE=ON; detection uses find_package(hipfile REQUIRED).
Without hipFile, F is still parsed and transfers using it fail with a
clear error.

Transfer syntax

  • Read: (SN->F0->GN) — storage to GPU
  • Write: (GN->F0->SN) — GPU to storage

One side must be S and the other GPU device memory on the executor's
GPU; mixed configurations are rejected.

nvme preset
Writes then reads each storage path per GPU with data validation; reports
the hipFile I/O path in use (direct / compat / mixed); exits non-zero on
failure.

Data-safety defaults
Block devices are read-only by default (TB_STORAGE_ALLOW_BLOCK_WRITE=1
to enable writes). Existing files are read-only by default
(TB_STORAGE_ALLOW_OVERWRITE=1 to enable writes). Paths under /dev/
are never created by TransferBench.

Topology change
The topology structure exchanged between ranks gained new fields.
Multi-rank runs that mix binaries with and without this change will not
interoperate.

Documentation additions: docs/how to/storage-benchmarking.rst (new
how-to), updated environment-variable reference, and updated timing and
data-validation conceptual pages.

Test Plan

  • Build with -DENABLE_HIPFILE=ON against a ROCm installation that
    includes hipFile and verify the binary links.
  • Build without ENABLE_HIPFILE and confirm F transfers produce a
    clear "not built with hipFile" error.
  • Run the nvme preset against a local NVMe device or file and verify
    bandwidth numbers and pass/fail output.
  • Run with TB_STORAGE_ALLOW_BLOCK_WRITE=0 against a block device and
    confirm writes are refused.
  • Run with alwaysValidate=1 and verify data-validation passes on both
    read and write transfers.

Test Result

Submission Checklist

🤖 Generated with Claude Code

SwRaw and others added 2 commits November 20, 2026 10:30
* Doc updates

* Add RVS note

* Sync build_from_source.rst and presets.rst with v1.70 architecture changes

- Reflect NIC support always being compiled in (libibverbs loaded via dlopen
  at runtime); drop removed DISABLE_NIC_EXEC/DISABLE_DMA_BUF/ENABLE_NIC_EXEC/
  ENABLE_DMA_BUF and stale HIPCONFIG/AMD_SMI_EXECUTABLE/HIPCONFIG_EXECUTABLE
  references; add DISABLE_NVML/DISABLE_CUMEM/BUILD_RELOCATABLE_PACKAGE
- Update GPU_TARGETS default list and preset overview table to match
  upstream (gfx1152/gfx1153/gfx1250-strict; bmasweep, empty, envvars,
  gfxsweep, hbm, healthcheck, help, smoketest, wallclock, and the new
  latency presets)
- Bump stale "TransferBench 1.67.0" version reference in presets.rst

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* 1.71.0 doc updates

* version number and known issues

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Add a storage memory type and an executor that moves data between GPU
memory and a file or block device, so NVMe-to-GPU transfers can be
benchmarked alongside the existing executors.

- Memory type S (MEM_STORAGE): SN is the N-th entry of the
  comma-separated TB_STORAGE_PATHS list, a regular file or a block
  device such as /dev/nvme1n1.
- Executor F (EXE_GPU_HIPFILE): hipFileRead / hipFileWrite. hipFile is
  an optional build-time dependency found through hipfile.h from the
  hipFile development package: auto-detected by the Makefile
  (HIPFILE_PATH, DISABLE_HIPFILE=1) and by CMake
  (ENABLE_HIPFILE=AUTO|ON|OFF). Package builds gain a dependency on the
  hipFile runtime package when enabled. Without hipFile, F is still
  parsed and Transfers using it are refused with an error.
- Transfers are (S0->F0->G0) to read and (G0->F0->S0) to write. One
  side must be storage and the other GPU device memory on the
  executor's GPU; everything else is refused with an error.
- New "nvme" preset: writes and reads each storage path per GPU with
  data validation, reports which hipFile I/O path ran, and exits
  non-zero on failure.

Existing data is protected by default. Writing to a block device needs
TB_STORAGE_ALLOW_BLOCK_WRITE=1, writing to a file that already holds
data needs TB_STORAGE_ALLOW_OVERWRITE=1, and paths under /dev/ are
never created.

Also add TB_STORAGE_TIMED_SYNC and TB_HIPFILE_SKIP_BUF_REGISTER, a
how-to page for NVMe benchmarking, and updates to the reference docs,
help text, example config and skills.

The topology exchanged between ranks gained fields, so binaries with
and without this change do not interoperate in multi-rank runs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
@sbates130272 sbates130272 self-assigned this Nov 20, 2026
@sbates130272 sbates130272 added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 20, 2026
@sbates130272 sbates130272 changed the title Users/stebates/add hipfile [feat]: Add hipFile executor for storage based benchmarking. Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants