Repository navigation
[feat]: Add hipFile executor for storage based benchmarking. - #370
Draft
sbates130272 wants to merge 2 commits into
Draft
sbates130272 wants to merge 2 commits into
sbates130272 wants to merge 2 commits into
Conversation
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)SNnames the N-th entry ofTB_STORAGE_PATHS(a comma-separated listof regular files or raw block devices such as
/dev/nvme1n1).Executor
F(EXE_GPU_HIPFILE)Uses
hipFileRead/hipFileWriteto move data directly between NVMestorage 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 usesfind_package(hipfile REQUIRED).Without hipFile,
Fis still parsed and transfers using it fail with aclear error.
Transfer syntax
(SN->F0->GN)— storage to GPU(GN->F0->SN)— GPU to storageOne side must be
Sand the other GPU device memory on the executor'sGPU; mixed configurations are rejected.
nvmepresetWrites 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=1to enable writes). Existing files are read-only by default
(
TB_STORAGE_ALLOW_OVERWRITE=1to 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(newhow-to), updated environment-variable reference, and updated timing and
data-validation conceptual pages.
Test Plan
-DENABLE_HIPFILE=ONagainst a ROCm installation thatincludes hipFile and verify the binary links.
ENABLE_HIPFILEand confirmFtransfers produce aclear "not built with hipFile" error.
nvmepreset against a local NVMe device or file and verifybandwidth numbers and pass/fail output.
TB_STORAGE_ALLOW_BLOCK_WRITE=0against a block device andconfirm writes are refused.
alwaysValidate=1and verify data-validation passes on bothread and write transfers.
Test Result
Submission Checklist
🤖 Generated with Claude Code